Disable Introspection |
If you know that you won't be using any of Umpire's introspection capabalities for allocations that come from a particular umpire::Allocator
, you can turn off the introspection and avoid the overhead of tracking the associated metadata.
Warning
Disabling introspection means that allocations from this Allocator cannot be used for operations, or size and location queries.
In this recipe, we look at disabling introspection for a pool. To turn off introspection, you pass a boolean as the second template parameter to the umpire::ResourceManager::makeAllocator
method:
../../../examples/cookbook/recipe_no_introspection.cpp
Remember that disabling introspection will stop tracking the size of allocations made from the pool, so the umpire::Allocator::getCurrentSize
method will return 0:
../../../examples/cookbook/recipe_no_introspection.cpp
The complete example is included below:
../../../examples/cookbook/recipe_no_introspection.cpp