• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Custom Memory Allocation in C++

Obito

0x1337
Joined
Feb 17, 2011
Messages
351
Solutions
8
Reaction score
152
Location
Egypt
Is it possible to implement a custom memory allocator in C++ that performs better than the default allocator provided by the standard library, in terms of both speed and memory efficiency, and if so, how might this be done?
 
Q: Is it possible to implement a custom memory allocator in C++?
A: Yes

Q: That performs better than the default allocator provided by the standard library, in terms of both speed and memory efficiency?
A: Maybe, depends on its application

This kind of thing is very usual on Embedded Systems, specially where a RTOS is running on. The approach is to previouslly allocate the memory and later manage it, depending on pre-configured specifications. You can read more about it on FreeRTOS website.
 
Is it possible to implement a custom memory allocator in C++ that performs better than the default allocator provided by the standard library, in terms of both speed and memory efficiency, and if so, how might this be done?

Yes, there are countless of third party allocators which perform way better than default one, for example:

 
Back
Top