Description
As noted in #44 (comment), we probably want to add a section in the alloc-module documentation, which describes, what's an legal allocator.
As @Lokathor wrote up, this section
would be similar to how the
core::ptr
module has a section that describes the pointer validity rules, and how thecore::sync::atomic
andstd::thread
modules describe that Rust has some sort of system for threads and atomics and you should go read the C++ specs to learn about it because right now we just do "what llvm does" and that's "what C++ does".The main rules would be things that "make sense anyway", like you can't start allocating from a location just past the end of the stack and then call a function because when you push stuff onto the stack it starts writing into your allocation pool and the program gets very sad.