Oso Memory Profiler

4.7 - OsoMP_NewAttribute

Inserts a new attribute type into the profile.

void OsoMP_NewAttribute( UInt8              id,
                         OsoMPAttributeType type,
                         const char*        name );
id Application defined unique identifer for this attribute type.

This value must be greater than ATTRIBUTEID_FirstUser (20) and, obviously, less than 256.
type Defines the data type of this attribute. This can be one of the following values:
    32-bit signed integer.

    64-bit signed integer.

    32-bit float.

    UTF8 encoded text.

    Fully qualified UTF8 absolute path.

    UTF8 encoded URL.

    Signed 64-bit microsecond counter since 1970-01-01 00:00:00 GMT (the Unix time epoch).

    32-bit unsigned integer denoting Hz.
name Specifies the name that will be displayed to the user in the Oso Memory Profiler for attributes of this type.
Attributes are a way to add custom data to each allocation, free, or message event. By registering attribute types beforehand, the amount of information that needs to be stored with each event can be reduced.

Attributes must be added before they are referenced by any memory block or block type.