Comments (5)
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.
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.
There's an easy solution: stop populating the chunk pool and set its default size to, say, 1 TB.
from mpl.
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.
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)
- Some simple programs fail to compile. simplifyTypes pass raises Fail: ... no varInfo property HOT 19
- raised: Fail: x_0 has no varInfo property HOT 1
- Difference between MLton and MPL block-sizes ? HOT 6
- Enable GC without the scheduler HOT 1
- Enable GC at the "top level" HOT 1
- Impossible to use 2-cores implicitly HOT 3
- Bug: `smith-normal-form` test failure due to `bytesRequested` larger than one block at limit check
- 'nix-build' fails HOT 1
- Unsafe scope checking for CCs
- How to disable overflow checks for integers? HOT 5
- Link errors during compilation HOT 6
- Opportunity for performance improvement in CC HOT 3
- `callIfIsObjptr` double read
- GC bug on skyline benchmark? HOT 3
- MLton and MPL relationship question? HOT 4
- be able to print any type HOT 6
- CGC performance improvements
- Unable to build with MLton with MPL installed HOT 1
- Real.toString (and similar functions) not thread safe HOT 2
- Grammar railroad diagram HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpl.