Taking ownership of memory, how straightforward is it?
In real time systems (e.g. games), operations such as malloc are considered unacceptably slow. A common pattern in the games industry is to profile or predict the memory usage of your program. Then allocate a single massive buffer with malloc, and from then on manage your own memory without ever calling free or malloc again.
In rust it seems that memory is often allocated and de allocated for you following a similar pattern to C++'s RAII. Let us say you need to take control of memory yourself and you never want the OS to allocate or de-allocate for you. Could you do the same thing as with C or C++ and make a megabuffer and then push data to that buffer, essentially taking full repsonsibility of the memory and the lifetime of your objects?