linked-list-allocator | LockedHeap type that implements the GlobalAlloc trait | Wrapper library
kandi X-RAY | linked-list-allocator Summary
kandi X-RAY | linked-list-allocator Summary
linked-list-allocator
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of linked-list-allocator
linked-list-allocator Key Features
linked-list-allocator Examples and Code Snippets
Community Discussions
Trending Discussions on linked-list-allocator
QUESTION
I am working in an environment where I cannot use heap memory but only stack memory. To not be constrained by the #[no_std]
enviroment I tried to use stack memory as heap memory with the linked-list-allocator crate. This was my approach.
ANSWER
Answered 2021-Apr-02 at 10:11After looking into the code and finding what looks a lot like the default entry point I'll put what I think is the confirmation of my guess as an answer: the global_allocator
must be fully initialised before main
, because the default entry point relies on it and allocates: https://github.com/rust-lang/rust/blob/master/library/std/src/rt.rs#L40-L45
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install linked-list-allocator
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page