Oso Memory Profiler

4.10 - OsoMP_NewWarningCondition

Inserts a new warning expression into the profile.

void OsoMP_NewWarningCondition( const char* expression,
                                ... );
expression The expression string.

Expression strings can reference event attributes either via their numerical ID, or their simple name. Attribute references must be enclosed in braces "{ }", and specify the event (allocation/message or free) to which they refer. Event references take the form "F:" for the first event, and "S:" for the second. The remaining part of the attribute reference should be the ID or simple name. For example:

{F:1} or {F:size}The size of the first event.
{F:35}The attribute attached to the first event with the ID 35.
{S:threadid}The ID of the thread that freed the memory.
Please see the page on expressions for further information.
... Because expression strings can contain %d format specifiers for easier insertion of attribute IDs. You can pass attribute IDs as additional parameters to this function in the same manner as you would for printf.
Warning expressions are evaluated against every allocation, free, and message event in the profile. Events for which the expression evaluates to true are marked as having warnings.