|
ADS
Algorithms and Data Structures
|
A pool of objects of one type, beyond the book. More...
Files | |
| file | ADS/memory/ObjectPool.h |
| A pool of objects of one type, beyond the book: make() builds an object in a slot of the pool and free() destroys it and keeps its slot, which the next make() takes again (the last one freed first), so that the nodes of a linked structure cost no call to the allocator, the slot just freed is still in the cache when it is used again, and the objects made one after another are next to each other in memory. | |
Classes | |
| class | ADS::ObjectPool< T, A > |
| a pool of objects of type T in blocks of at most \( n \) slots More... | |
A pool of objects of one type, beyond the book.
The definitions, the invariants and the costs of the area are in Theory of memory.