-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alloc implementation #397
Comments
Regarding the README, it needs a rewrite: #398. I haven't gotten around to implementing allocation support yet. I was planning to add a separate memory allocation crate, and add a hook to The integration testing infrastructure is a higher priority for me, so it will be a while before I have the time to implement dynamic memory allocation. If you want to implement it, go ahead, and I'm happy to discuss designs further. |
While I'm getting by on ArrayVec for now, could you point out some resources for whoever ends up implementing it? From what I've gathered, allocation has something to do with memop, but I wasn't able to figure out which exactly from libtock-c (one of the break setting commands?). Something about interfacing the alloc code with Rust would be helpful as well. While that information is probably more-or-less searchable, if you had any links at hand, it would help as a shortcut for whoever ends up actually working on allocation. |
The memory layout for a I recommend the following steps:
That should allow you to implement the allocator in separate crates that depend on To request more memory from the kernel, the allocator should increase the heap break (which sets the upper boundary of the memory that is accessible to the process) using memop. To return memory, decrease the break. Don't drop it below the start of heap memory, or the app can fault (because it would lose access to global variables). I don't really have advice on interfacing with Rust's |
I've noticed that there are some mentions of alloc in the commit history and the README, but there isn't actually an "alloc" feature.
Is there some version in the works that needs help?
The text was updated successfully, but these errors were encountered: