EasyManuals Logo
Home>Texas Instruments>Calculator>TI-89

Texas Instruments TI-89 Developer's Guide

Texas Instruments TI-89
1398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #897 background imageLoading...
Page #897 background image
Appendix A: System Routines — Memory Management
855
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
HeapLock
Declaration:
void
HeapLock
(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.
Inputs:
handle
Handle created with a heap allocation routine like
HeapAlloc
or
HeapAllocThrow
.
Outputs:
None
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;
BYTE *pBlock;
if (hBlock = HeapAlloc(100)) {
HeapLock( hBlock );
pBlock = HeapDeref( hBlock );
/* pBlock may now be used even if the heap is compressed */
DlgMessage( "HeapLock", "pBlock points to locked memory" );
/* can still use pBlock here */
HeapUnlock( hBlock );
DlgMessage( "HeapUnlock", "pBlock may now be invalid" );
/* Cannot use pBlock here as the memory it points to may have moved */
pBlock = HeapDeref( hBlock );
/* Redereferenced hBlock so now pBlock is useable until next heap compression. */
HeapFree( hBlock );
}

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals