Public API Reference

Memory allocators

Several Crystal Space utility classes take optional memory allocators (e.g.

csArray<>). This allows clients to customize the memory allocation strategy used in a particular case.

For example, if you know that an array has a size below a certain threshold most of the time, you could utilize a LocalBufferAllocator<> which return memory from a fast local buffer, if possible - this is faster than using the heap.

As another example, when memory allocations follow a pattern where long-lived allocations are mixed with very short-lived allocations, heap fragmentation can occur when the short-lived allocations are freed. In that case it's beneficial to use a separate heap for the short-lived allocations; specific objects can use that heap via the allocator customization.

Allocators must obey the following methods and their semantics:

Generated for Crystal Space 1.4.1 by doxygen 1.7.1