Hlock - Texas Instruments TI-89 Developer's Manual

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

Appendix A: System Routines — Memory Management

HLock

Declaration:
void * HLock (HANDLE handle )
Category(ies):
Memory Management
Description:
Lock the block of heap memory associated with handle so that it will not
move on the next heap compression and then return the dereferenced
value of the handle.
Inputs:
handle — Handle created with a heap allocation routine like HeapAlloc
Outputs:
HeapDeref (HeapLock ( handle ))
Assumptions:
Memory allocated with HeapAllocHigh and HeapAllocHighThrow is
locked to begin with.
Side Effects:
Locking memory may cause the system to run out of useable memory
sooner than if memory is kept unlocked.
Availability:
All versions of the TI-89 / TI-92 Plus.
TI-89 / TI-92 Plus
Differences:
None
See Also:
HeapUnlock, HeapGetLock, HeapMoveHigh, HeapAllocHigh
Example:
HANDLE hBlock;
void *pBlock;
if (hBlock = HeapAlloc(100)) {
pBlock = HLock( hBlock );
/* . . . pBlock may now be used even if the heap is compressed . . . */
HeapFree( hBlock );
}
TI-89 / TI-92 Plus Developer Guide
or HeapAllocThrow.
Not for Distribution
865
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents