Startup and Memory Management APIs are used to initialize or free the global resources used by the program, and to create or free the memory used by the program elements.
This page contains information about the Startup and Memory Management APIs for C and C++, including the description and syntax, and the input, input types, input description, and input return values.
int na_startup(char* errbuff, int errbuffsize);
Initializes the global resources.
It is a prerequisite to call this function before invoking any Data ONTAP API.
|
Input |
Type |
Description |
|
errbuffsize |
int |
The length of errbuff. |
|
Output |
Type |
Description |
|
errbuff |
char* |
In case of error, a message is written into the buffer. |
1 (TRUE) on success
0 (FALSE) on failure
void na_shutdown(void);
Frees the system resources
None
void na_free(const void* ptr);
Frees memory that is pointed to by ptr.
You should use this API to free any memory allocated by the na_* APIs, such as na_child_get_string_encrypted().
|
Input |
Type |
Description |
|
ptr |
const void* |
The address of the memory to be freed. |
None
na_elem_t* na_elem_new(const char* name);
Allocates resource for a new element.
|
Input |
Type |
Description |
|
name |
const char* |
The name of the element for which a resource is to be allocated. |
The pointer to the allocated element
NULL on failure
Prototype
void na_elem_free(na_elem_t* elt);
Description
Frees all resources used by the input output element elt.
|
Input |
Type |
Description |
|
elt |
na_elem_t * |
The element memory to be freed. |
None