.TH "globus_memory" 3 "Thu Jan 12 2017" "Version 16.9" "globus_common" \" -*- nroff -*- .ad l .nh .SH NAME globus_memory .SH SYNOPSIS .br .PP .SS "Functions" .in +1c .ti -1c .RI "\fBglobus_bool_t\fP \fBglobus_memory_init\fP (globus_memory_t *mem_info, int node_size, int node_count)" .br .RI "Initialize memory pool\&. " .ti -1c .RI "void * \fBglobus_memory_pop_node\fP (globus_memory_t *mem_info)" .br .RI "Retrieve a memory item from a pool\&. " .ti -1c .RI "\fBglobus_bool_t\fP \fBglobus_memory_push_node\fP (globus_memory_t *mem_info, void *buffer)" .br .RI "Return a memory item to the pool\&. " .ti -1c .RI "\fBglobus_bool_t\fP \fBglobus_memory_destroy\fP (globus_memory_t *mem_info)" .br .RI "Destroy a memory pool\&. " .in -1c .SH "Detailed Description" .PP The globus_memory abstraction implements a memory management pool for groups of same-sized data items\&. .SH "Function Documentation" .PP .SS "\fBglobus_bool_t\fP globus_memory_destroy (globus_memory_t * mem_info)" .PP Destroy a memory pool\&. Free all the memory associated with the memory management structure\&. For every call to \fBglobus_memory_init()\fP there should be a call to \fBglobus_memory_destroy()\fP or else memory will leak\&. .SS "\fBglobus_bool_t\fP globus_memory_init (globus_memory_t * mem_info, int node_size, int node_count)" .PP Initialize memory pool\&. Initialize the globus memory management structure\&. .PP Before using any functions associate with a memory structure this function must be called\&. .PP \fBParameters:\fP .RS 4 \fImem_info\fP The memory management datatype .br \fInode_size\fP The size of the memory to allocated with each pop\&. .br \fInode_count\fP The initial number of nodes allocated with the memory management structure\&. If it is exceeded more will be allocated\&. .RE .PP .SS "void* globus_memory_pop_node (globus_memory_t * mem_info)" .PP Retrieve a memory item from a pool\&. Pop a chunk of memory out of the memory management structure\&. Similar to malloc()\&. When no longer using this item, return it to the pool via \fBglobus_memory_push_node()\fP\&. .SS "\fBglobus_bool_t\fP globus_memory_push_node (globus_memory_t * mem_info, void * buffer)" .PP Return a memory item to the pool\&. Push a chunk of memory back into the memory management structure\&. Similar to free()\&. .SH "Author" .PP Generated automatically by Doxygen for globus_common from the source code\&.