The alloc v4 API method allocates a block of memory.
void*alloc( a_v4_extfn_proc_context *cntxt, size_t len )
Allocates a block of memory of length at least len. The returned memory is 8-byte aligned. Sybase recommends using the alloc() method as your only means of memory allocation, which allows the server to keep track of how much memory is used by external routines. The server can adapt other memory users, track leaks, and provide improved diagnostics and monitoring.
Memory tracking is enabled only when external_UDF_execution_mode is is set to a value of 1 or 2 (validation mode or tracing mode).
Parameter | Description |
---|---|
cntxt | The procedure context object |
len | The length, in bytes, to allocate |