The Complete SPRLIB & ANNLIB
malloc_sample
- allocate a SAMPLE structure
SYNOPSIS
ARGUMENTS
None.
RETURNS
A pointer to a newly allocated SAMPLE structure if succesful,
NULL otherwise.
FUNCTION
This function is used to allocate a number of SAMPLE structures at a time,
in order to minimize operating system overhead when allocating multiple
structures. It uses the malloc_local function to keep track of the
allocated blocks of memory.
SAMPLE_STOCK sample structures are allocated at a time, and individual
structures are distributed from this stock. A pointer to a linked list of
free structures is maintained through FreeSamples (see
STOCK-variables) and the SAMPLE structure's SystemData.p field.
Some default values are entered in the allocated sample structure:
Input = Output.Vector = Next = NULL and SampleFlag = SAMPLE_ENABLED
(see SAMPLE-flags).
NOTE
Structures allocated by this routine should be deallocated using the
free_sample function.
SEE ALSO
STOCK-values, malloc_dataset, free_dataset, free_sample
This document was generated using api2html on Thu Mar 5 09:00:00 MET DST 1998