This namespace contains fast memory manager tools.
| void * mem_get | ( | size_t | buf_size | ) |
Allocate the memory block.
This function allocates the memory block of buf_size bytes. If the memory block size is less than or equal to 4 Kbytes, then global pool manager will be used, otherwise new operator will be used.
To release allocated memory block you should call mem_put() function and provide the same memory block size!
In debug version the whole memory block is filled by 0xAA value.
| [in] | buf_size | The memory block size in bytes. |
| void mem_put | ( | void * | buf, | |
| size_t | buf_size | |||
| ) |
Release the memory block.
This function releases the memory block buf of buf_size bytes. If the memory block size is less than or equal to 4 Kbytes, then global pool manager will be used, otherwise delete operator will be used.
The memory block size buf_size should be the same as when calling mem_get()!
In debug version the whole memory block is filled by 0xAA value.
| [in] | buf | The memory block. |
| [in] | buf_size | The memory block size in bytes. |
| void * mem_get_sized | ( | size_t | buf_size | ) |
Allocate the memory block.
This function allocates the memory block of buf_size bytes. If the memory block size is less than or equal to 4 Kbytes, then global pool manager will be used, otherwise new operator will be used.
To release allocated memory block you should call mem_put_sized() function!
In debug version the whole memory block is filled by 0xAA value.
| [in] | buf_size | The memory block size in bytes. |
| void mem_put_sized | ( | void * | buf | ) |
Release the memory block.
This function releases the memory block buf. If the memory block size is less than or equal to 4 Kbytes, then global pool manager will be used, otherwise delete operator will be used.
In debug version the whole memory block is filled by 0xAA value.
| [in] | buf | The memory block. |
| bool omni::pool::operator== | ( | const Allocator< T > & | , | |
| const Allocator< U > & | ||||
| ) | [inline] |
Are two allocators equal?
The two allocators are always equal.
| bool omni::pool::operator!= | ( | const Allocator< T > & | , | |
| const Allocator< U > & | ||||
| ) | [inline] |
Are two allocators non-equal?
The two allocators are always equal.
1.5.2