[Next] [Previous] [Up] [Top] [Contents] [Index]

Chapter 1. General PSYX information

1.6 Memory Management

The standard ANSI memory routines are a available to PSYX through the Toolbox Utilities. However, instead of malloc(), free(), et al., it is recommended that you use equivalent PsyScope routines: Malloc(), Free(), etc. These routines are faster, have more error-checking ability, and do not fragment PsyScope's heap.

There is also an ExpMalloc() family of memory routines. These are used for allocations within the PsyScript's heap, and should generally not be used.

The Malloc() and ExpMalloc() families actually call the ExpZoneMalloc() family, which handles memory allocations in arbitrary heaps. Using the ExpZoneMalloc() routines, you can set up your own sub-heap within PsyScope; this is useful when you need to perform a large number of allocations and free them all at once (by freeing the entire heap).

PSYX Programmer's Manual - 24 AUG 95
[Next] [Previous] [Up] [Top] [Contents] [Index]

Generated with CERN WebMaker