[xsde-users] Custom allocators/deallocators

Boris Kolpackov boris at codesynthesis.com
Fri May 7 02:51:31 EDT 2010


Hi Kjell,

ietab at hotmail.com writes:

> Is it possible to have a private memory pool with xsde? In our embedded
> system are we not allowed to allocate/deallocate from the system heap 
> when we are up and running. Everything must be allocated at start-up,
> we are afraid of out-of memory exceptions and memory fragmentation.
> If a sub-system needs "dynamic" memory then we have to use a private
> memory pool with it's own memory handler for that sub-system.

While we are planning to add more convenient support for this in the 
next release of XSD/e, there is a way to achieve this with the current
version by overriding operator new/delete (and performing a few other 
steps). This will work well if no other sub-system uses C++ new/delete
for memory management. Let me know if this will work for your application
and I will describe in more detail what needs to be done.

Alternatively, I can give you a beta version for the next release.

Also, can you let us know which platform/toolchain you are using.

Boris



More information about the xsde-users mailing list