DS_ALLOC_CONTIGUOUS_LIST(3)

FUNCTION
ds_alloc_contiguous_list - Allocate a contiguous list of linked list entries.

SYNOPSIS
#include <karma_ds.h>

flag ds_alloc_contiguous_list

(CONST packet_desc *list_desc, list_header *list_head, unsigned int length, flag clear, flag array_alloc)

DESCRIPTION
This routine will allocate a contiguous block of linked list entry data packets. No <<list_entry>> structures are allocated, they are implied. The routine will recursively allocate memory for sub arrays and linked lists. The list must be empty. The <<contiguous_length>> value in the list header will be set to the list length.

list_desc
    The packet descriptor for the linked list.

list_head
    The list header.

length
    The number of list entries to allocate.

clear
    If TRUE, then the routine will initialise (set to zero) all the data.

array_alloc
    If FALSE, and an array is an atomic array, then instances of that array will NOT be allocated, and a NULL pointer will be written into the parent element, else the array will be allocated.

RETURN VALUE
TRUE on success, else FALSE.

Multi-threading Level
Unsafe.

NOTE
On failure, the list header is deallocated.

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/