The current memory allocator is simply a wrapper around malloc/free...extend this to work for multiple threads by creating a memory pool that gives any requesting thread a 2MB chunk of memory to use. The thread can then use this 2MB chunk to allocate from until full, at which point it'll get another 2MB chunk.
The current memory allocator is simply a wrapper around malloc/free...extend this to work for multiple threads by creating a memory pool that gives any requesting thread a 2MB chunk of memory to use. The thread can then use this 2MB chunk to allocate from until full, at which point it'll get another 2MB chunk.