Synopsis

PDX_MSGT mda_MallocEntity2(long option, int model, DDF_TF tf, void *ent)

Purpose

Allocate an entity in memory.

Description

An entity is allocated from the heap. The entity does not exist in the database. All of the mda memory management routines may be used to manipulate memory associated with the entity. Memory associated with the entity can be freed by calling mda_FreeEntity or the entity can be committed to the database by calling mda_CreateEntity. This function allows an application to create memory resident entities without the overhead of actually committing the entity to the database. Note that the ent argument is the address of the pointer to store the allocated memory pointer in.

Input

option

See the options for mda_MallocEntity.

model

Model whose DDF TF is defined in

tf

TF of the entity to be allocated

ent

Address to store the allocated memory pointer at

Output

ent

The allocated entity

Return

MDA error code