Код: Выделить всё
char buffer[1024];
void main() {
// force following malloc calls to allocate from inside the buffer.
set_malloc_buffer(buffer); // how to implement this?
char* chunk = malloc(128); // should now return a free chunk of the buffer
...
...
free(chunk); // will free the chunk inside buffer for reuse
}
< /code>
Это возможно для реализации? Как охватить это, например. Убедитесь, что определенные структуры/библиотеки будут использовать определенный буфер Подробнее здесь: https://stackoverflow.com/questions/796 ... ted-buffer