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

HeapSize

Declaration:
DWORD HeapSize (HANDLE handle )
Category(ies):
Memory Management
Description:
Return the number of bytes allocated for the given heap block. Due to word
alignment and minimum block size, this may not be the amount it was
allocated with. Note that heap compression itself can in rare circumstances
increase the size of a heap block by a couple of bytes; therefore it is best
not to rely on HeapSize to determine the true size of a block of heap
memory.
handle — Handle of a heap block allocated with one of the heap
Inputs:
Outputs:
Size of block of heap memory for handle .
Assumptions:
None
Side Effects:
None
Availability:
All versions of the TI-89 / TI-92 Plus.
TI-89 / TI-92 Plus
Differences:
None
See Also:
HeapAlloc, HeapAllocThrow, HeapRealloc
Example:
HANDLE h1, h2;
DWORD s1, s2;
h1 = HeapAlloc( 4 );
s1 = HeapSize( h1 );
h2 = HeapAlloc( 11 );
s2 = HeapSize( h2 );
TI-89 / TI-92 Plus Developer Guide
allocation routines.
/* will be 8 since that is the minimum block size */
/* will be 12 since all blocks must be even in length */
Not for Distribution
861
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