TOC PREV NEXT INDEX

FLDFget_ncomp, FLDFset_ncomp

Synopsis

void * _ ARRalloc
(
NULL,
int__type,
size_t _number_of_elements,
NULL__);

Description

The ARR package is used by AVS/Express to maintain arrays in memory with reference counts. These arrays are typically allocated with the C malloc facility. The ARRalloc routine calls malloc and gives the resulting array a reference count of 1. The ARRfree routine decrements the reference count, and if 0, calls the free routine. There is another routine ARRincr_refcnt that adds 1 to the refcnt of an array. These arrays are identified directly by the pointer to the array.

You typically do not call ARRalloc. You only need it when you are setting an array with the OMset_array function, the mode is OM_SET_ARRAY_FREE, and you want to maintain your own reference to the array after the call. See OMget_array .

Parameters

type
n integer code specifying the array's data type. AVS/Express provides the following symbolic constants, defined in <avs/dtype.h>:

Type

Meaning

DTYPE_CHAR

Character

DTYPE_BYTE

Byte

DTYPE_SHORT

Short integer

DTYPE_INT

Integer

DTYPE_FLOAT

Single-precision floating point

DTYPE_DOUBLE

Double-precision floating point

DTYPE_PTR

Pointer

DTYPE_STRING

Character string


number_of_elements
The size of the array, in terms of number of elements.
Returned value

A pointer to the array, or NULL if ARRalloc failed.

Examples

none.

Examples

none.

Files

v/fld.v.

See Also

none.

TOC PREV NEXT INDEX