EasyManuals Logo

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 #888 background imageLoading...
Page #888 background image
846
Appendix A: System Routines — Memory Management
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
HeapAllocHigh
Declaration:
HANDLE
HeapAllocHigh
(DWORD
Hlen
)
Category(ies):
Memory Management
Description:
Allocate a block of heap memory at the high end of the heap, lock it and
return its handle. This routine should NOT be used as a general heap
allocation routine. It also compresses the heap first to (hopefully) move all
used (unlocked) blocks of memory down. Blocks of memory that are locked
for long periods of time should be moved high in memory so that they do
not interfere as much with rest of the system.
Inputs:
Hlen
Length of block of memory to allocate (all odd sizes are rounded
up to be even).
Outputs:
HANDLE of memory block allocated, H_NULL if not enough memory.
Assumptions:
Hlen
may not exceed 65520 bytes and the minimum block size is eight
bytes.
Side Effects:
This routine ALWAYS compresses the heap before it tries to allocate the
requested memory and so is much slower than the standard
HeapAlloc
routine. 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: HeapAlloc, HeapDeref, HeapFree
Example:
HANDLE hPermament;
SYS_STRUCT *pSysStruct;
if (hPermament = HeapAllocHigh(500)) {
/* hPermament is the handle to a block of memory that is needed through-out the
life of this app and must be kept locked at all times */
pSysStruct = HeapDeref( hPermament ); /* pSysStruct is always valid */
/* . . . pSysStruct is used here . . . */
HeapFree( hPermament );
}

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