Manage memory

A C user-defined routine (UDR) has access to shared memory for dynamic allocations and stack memory for routine arguments (including the MI_FPARAM structure), local stack variables, and return values.

The DataBlade® API provides functions to manage these types of memory.

Table 1. Memory-allocation task and DataBlade API function
Memory-allocation task Allocation Deallocation Other
Shared memory for user memory mi_alloc(), mi_dalloc(), mi_realloc(), mi_zalloc() mi_free() mi_switch_mem_duration()
Shared memory for named memory mi_named_alloc(), mi_named_zalloc() mi_named_free() mi_named_get(), mi_lock_memory(), mi_try_lock_memory(), mi_unlock_memory()
Stack memory for routine arguments mi_call() None None