Heapallochighthrow - 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

HeapAllocHighThrow

Declaration:
HANDLE HeapAllocHighThrow (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.
Hlen — Length of block of memory to allocate (all odd sizes are rounded
Inputs:
Outputs:
HANDLE of memory block allocated, throws an ER_MEMORY error if not
enough memory (HeapAllocHigh just returns H_NULL in that case).
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.
This routine may throw an ER_MEMORY error.
Availability:
All versions of the TI-89 / TI-92 Plus.
TI-89 / TI-92 Plus
Differences:
None
See Also:
HeapAllocHigh, HeapAllocThrow, HeapFree, HeapFreeIndir
Example:
See HeapAllocThrow substituting HeapAllocHighThrow for
HeapAllocThrow.
TI-89 / TI-92 Plus Developer Guide
up to be even).
Not for Distribution
847
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