first previous next last contents


#include <IO.h>

int allocate(
        GapIO    *io,
        GCardinal type);

These allocate and deallocate records in the g database.

Th allocate function allocates a new record from the g database. It finds a free record, or creates a new record, and returns this record number. The record will be automatically locked for exclusive read/write access. The type of the record is sent in type. This must be one of following:

The function does not initialise or even write the new record to disk. The record number is valid, but a GT_Read call will produce an error. It is up to the caller to initialise the structure and perform the first GT_Write (or equivalent) call.

It returns the record number for success, and terminates the program for failure.

first previous next last contents
This page is maintained by staden-package. Last generated on 1 March 2001.