DD::Image::AllocTrackingInfo Struct Reference

A structure holding information about a tracked object's memory allocation. More...

List of all members.

Public Types

typedef std::vector
< AllocTrackingInfo
Vector
typedef uint64_t Checkpoint

Public Member Functions

 AllocTrackingInfo (void *addressIn, size_t sizeIn, Checkpoint checkpointIn)

Public Attributes

void * address
void * objAddress
size_t size
Checkpoint checkpoint
std::string info

Detailed Description

A structure holding information about a tracked object's memory allocation.

We track both the address of the allocated block, and the address of the object being stored, since these may differ; for example in the case where memort is being allocated for an object that multiply-inherits form Node and another class, where Node is not the first listed base class. Another case is arrays, where the block of memory may start with an array length cookie. So we hold the address of the object (or in the case of arrays, one of the objects), so that the AllocationAdaptors can reliably cast to an actual object of the required type from the correct address. The address is populated by constructors of types that use our custom memory allocator.