structname_fieldname_alloc(vector)

This function causes eXtremeDB to allocate pages in the database to hold the vector elements, which are subsequently assigned with classname_fieldname_put_range() methods.

Prototype

    MCO_RET structname_fieldname_alloc( /*IN*/ structname *handle,
                             /*IN*/ uint2 size );

Arguments

handle
A pointer to a structname handle.
size
A uint2 that specifies the number of elements that will be stored in the vector.

Description

This function causes eXtremeDB to allocate pages in the database to hold the vector elements, which are subsequently assigned with classname_fieldname_put_range() methods. If invoked on an existing object, the vector is resized to size, truncating the vector if size is less than the current vector size. If size is greater than the current size the vector is moved to a new larger space; the space previously used by the vector is lost, so care should be taken not to reallocate vectors too frequently.

Return Codes

See classname_fieldname_alloc (vector).

Related Topics Link IconRelated Topics