Function Memory.addMemHandler
AddMemHandler -- add a MemHandler to system list
MemHandler* addMemHandler
(
string name,
short pri,
int function(Memory, MemHandler*, va_toolbox .memory .MemHandlerData*) usercode,
void* userdata
);
This function adds a low memory handler to the system. The handler is described in the Interrupt structure. Due to multitasking issues, the handler must be ready to run the moment this function call is made. (The handler may be called before the call returns)
Parameters
Name | Description |
---|---|
name | Name of handler |
pri | priority of handler |
usercode | function pointer to handler |
userdata | some pointer to be passed to handler later |
Returns
MemHandler - Pointer to installed MemHandler or null.
Notes
Adding a handler from within a handler will cause undefined actions. It is safe to add a handler to the list while within a handler but the newly added handler may or may not be called for the specific failure currently running.
See
RemMemHandler