bit::memory
Classes
BoundsChecker

This concept defines a manner of injecting and checking memory fences around allocations. More...

Classes

class  bit::memory::debug_bounds_checker< FrontSize, BackSize >
 This type is used for checking boundaries around memory allocations to determine if buffer-overflows have occurred. More...
 
class  bit::memory::null_bounds_checker
 This bounds checker performs no operation, and is intended to be used for non-debug variations of the arena_allocator. More...
 

Detailed Description

This concept defines a manner of injecting and checking memory fences around allocations.

For type B to be a BoundsChecker, it must satisfy the following:

Provided

The following expressions must be well-formed and with the following side-effects:

b.prepare_front_fence( p, s );

Prepares a front-fence at the given pointer p with the size s


b.prepare_back_fence( p, s );

Prepares a back-fence at the given pointer p with the size s


b.check_front_fence( i, p, s );

Checks a front-fence at the given pointer p with the size s, for allocator i.


b.check_back_fence( i, p, s );

Checks a back-fence at the given pointer p with the size s, for allocator i.


std::size_t s = B::front_size

Convertible to std::size_t – the number of bytes to prepend to an allocation for a front memory fence


std::size_t s = B::back_size

Convertible to std::size_t – the number of bytes to append to an allocation for a back memory fence