_AddReclaimableItem


#include vmm.h

_AddReclaimableItem(ReclaimStruc *pReclaim, DWORD Flags);

Identifies regions of VM memory that may be reclaimable. Uses C calling convention and the EAX, ECX, EDX, and Flags registers.

pReclaim

Address of ReclaimStruc structure to add. The callback in the RS_CallBack member of the ReclaimStruc structure is called using the CDECL calling and register conventions, and has no defined return value. The reference data for the callback, if any, is not passed separately, since it is already available in the ReclaimStruc.

Flags

Reserved; must be 0.

If a region is already reclaimable, then RS_RECLAIM should be specified in the RS_Flags member of the specifed ReclaimStruc structure. Otherwise, a subsequent call to _SetReclaimableItem must be made to set RS_RECLAIM sometime prior to Init_Complete in order for the block to be re-used.

If the block's contents must be restored prior to System_Exit, then RS_RESTORE must also be specified in the RS_Flags member. If an optional callback address is also provided, then it will be called immediately after the contents have been restored, prior to System_Exit.

If the system elects to not use a fully-reclaimable block (for example, if the block's alignment or size makes it unsuitable), it will still call the caller's callback address, if any, so that any external references to the block can still be restored.

In the unlikely event a block marked reclaimable cannot later be reclaimed, call _SetReclaimableItem with the RS_RECLAIM flag clear.

See also _EnumReclaimableItem, ReclaimStruc, _SetReclaimableItem