GithubHelp home page GithubHelp logo

Comments (5)

ramLlama avatar ramLlama commented on July 20, 2024

I'll just note that with the current Chunk Pool setup, this is actually very tricky since I rely on the chunk pool being totally contiguous to make chunk/page metadata lookup easier. With a growable (and maybe shrinkable!) Chunk Pool, I'd need a way to figure out which metadata set to look into.

I have a concrete idea on how to do this, but let's focus on the other allocator effort first.

from mpl.

shwestrick avatar shwestrick commented on July 20, 2024

Just curious—do you actually rely on contiguity? Or do you only need chunks to be aligned at say, a large power-of-two?

from mpl.

adrieng avatar adrieng commented on July 20, 2024

There's an easy solution: stop populating the chunk pool and set its default size to, say, 1 TB.

from mpl.

ramLlama avatar ramLlama commented on July 20, 2024

I do actually rely on contiguity in addition to power-of-two alignment. If you look at these lines in chunk-pool.c, you'll see that metadata for a particular address is basically metadatas[((address & mask) - start) / pagesize].

Also, Adrien's solution, while totally LOL-worthy, would actually work. The chunk pool would simply not support shrinking. This isn't okay for a general purpose compiler, but for the kind of programs we run (i.e. benchmarks, not useful things), this is fine.

from mpl.

shwestrick avatar shwestrick commented on July 20, 2024

My new chunk allocator (a part of 7383b55) fixes this issue, although there is still the separate issue of needing to specify the size of the global heap ahead of time.

from mpl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.