![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
Pooled memory allocation for legacy model objects. More...
Go to the source code of this file.
Classes | |
| struct | alloc_handle_t |
Functions | |
| alloc_handle_t * | AllocInit (void) |
| Create a pool and select it as the shared current allocation pool. | |
| char * | Alloc (long) |
| Reserve four-byte-aligned storage from the current pool. | |
| alloc_handle_t * | AllocSetPool (alloc_handle_t *) |
| Replace the shared current-pool selection without freeing either pool. | |
| void | AllocReset (void) |
| Rewind the current pool for reuse without releasing its blocks. | |
| void | AllocFreePool (void) |
| Free every block/header and the root of the shared current pool. | |
Pooled memory allocation for legacy model objects.
| char * Alloc | ( | long | size | ) |
Reserve four-byte-aligned storage from the current pool.
| [in] | size | Nonnegative byte count small enough to fit within one ALLOC_BLOCK_SIZE block after four-byte rounding; oversized requests are unchecked. |
| void AllocFreePool | ( | void | ) |
Free every block/header and the root of the shared current pool.
| alloc_handle_t * AllocInit | ( | void | ) |
Create a pool and select it as the shared current allocation pool.
| void AllocReset | ( | void | ) |
Rewind the current pool for reuse without releasing its blocks.
| alloc_handle_t * AllocSetPool | ( | alloc_handle_t * | newpool | ) |
Replace the shared current-pool selection without freeing either pool.
| [in] | newpool | Existing pool handle; NULL deselects a pool but cannot be followed by allocation/reset/free until a live pool is selected. |