Osys_Lowmem_Callback_Register()
Abstract
Registers a callback to address memory shortages of a specified priority.
Syntax
Osys_Lowmem_Callback_Register (callback_proc, state_ptr, callback_priority)
| Argument | Type | Description |
|---|---|---|
callback_proc |
OsysT_Lowmem_Callback_Proc |
Callback to deal with a low-memory condition. |
state_ptr |
void * |
User-defined state to be passed to callback_proc when called. |
callback_priority |
int |
The priority level associated with callback_proc (see Details). |
Return Type
PrgT_Compcode
PrgC_Compcode_Success if the callback is registered successfully; PrgC_Compcode_Failure otherwise.
Header
osys_lowmem_funcs.h
Details
Possible values for callback_priority are:
OsysC_Lowmem_Callback_Priority_GarbageOsysC_Lowmem_Callback_Priority_PerformanceOsysC_Lowmem_Callback_Priority_Emergency
Typically, custom low-memory callbacks will be registered at the Garbage or Performance level.
The prototype for callback_proc is given in OsysT_Lowmem_Callback_Proc.