Oso Memory Profiler

4.8 - OsoMP_NewBlockType

Inserts a new block type into the profile.

void OsoMP_NewBlockType( UInt8       blocktype,
                         UInt32      rgbcolour,
                         const char* name,
                         const char* formatstring );
blocktype Application defined unique identifer for this block type.

This value must be greater than OSOMP_FirstUserBlockType (10) and, obviously, less than 256.
rgbcolour Defines the colour that will be used for these blocks.

Colours are 32-bit values with the format xRGB. I.e., the top byte is unused and should be zero.
name Specifies the name that will be displayed to the user in the Oso Memory Profiler for blocks of this type. This should be the plural form of the name.
formatstring Defines a format string that will be used to group similar blocks together.

The format string for built in memory blocks and memory buckets is simply {size}.
Block types are a way to distinguish between memory that is used for different purposes. For example, you might want to distinguish between memory blocks used for images, and memory used for audio samples. Any registered types can be passed as the type parameter to OsoMP_Allocate and OsoMP_Free.