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 #901 background imageLoading...
Page #901 background image
Appendix A: System Routines — Memory Management
859
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
HeapRealloc
Declaration:
HANDLE
HeapRealloc
(HANDLE
handle
, DWORD
NewHsize
)
Category(ies):
Memory Management
Description:
Try to reallocate the given heap block to a new size. If
handle
is H_NULL,
then just calls
HeapAlloc
. Return H_NULL if there is not enough memory
(will try to compress the heap first) or the new size is invalid; otherwise
return
handle
(will not change). If the block is LOCKED then it will not be
moved for reallocation! The contents of the object will be unchanged up to
the lesser of the new and old size. If the new size is larger the value of the
newly allocated portion of the object is indeterminate.
Inputs:
handle
Handle of a heap block allocated with one of the heap
allocation routines.
NewHsize
Length of block of memory to allocate (all odd sizes are
rounded up to be even).
Outputs:
Return
handle
if successful or H_NULL if not enough memory or invalid
NewHsize
.
Assumptions:
None
Side Effects:
May cause heap compression.
Availability:
All versions of the TI
-
89 / TI
-
92 Plus.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: HeapAlloc, HeapAllocThrow, HeapFree
Example:
HANDLE hBlock;
DWORD size = 1000;
if (hBlock = HeapAlloc( size )) {
/* . . . use hBlock . . . */
size = 100; /* shrink block down */
HeapRealloc( hBlock, size ); /* making smaller so will always succeed */
return( hBlock ); /* assume caller will free it */
}

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