Yes, this approach is followed as well, but now you're at the problem of writing a memory allocator by yourself (which might of course turn out to be better for your usecase). So the issue of writing code that avoids allocation still prevails, as now you probably want to know what to allocate memory for, since if you were supposed to make a general purpose allocator, it is likely it won't overperform libc malloc.