Oso Memory Profiler

4.1 - OsoMP_Allocate

Generates a new allocation event in the profile.

void OsoMP_Allocate( UInt8                 type,
                     void*                 mem,
                     UInt64                size,
                     const OsoMPAttribute* attributes,
                     UInt32                noofattributes );
type Specifies the type of memory block being allocated.

This value can be one of the standard memory block types, or any custom type previously registered through a call to OsoMP_NewBlockType.
mem The memory address of the memory block.
size The size in bytes of the piece of memory being allocated.
attributes Address of the first attribute in an array of attributes that will be appended to this event.

This parameter can be NULL if no custom attributes are required for this memory block.
noofattributes The number of entries in the array pointed to by the attributes parameter.
An allocation event typically signifies a new piece of memory is being allocated by the application. Memory blocks are primarily identified in the Oso Memory Profiler by their type and memory address. You can read more about block types here.

Allocation events should be paired with free events. Allocations which do not have associated free events will be marked as memory leaks in the Oso Memory Profiler.