Query: iarray_allocate
OS: debian
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
iarray_allocate(3) Library Functions Manual iarray_allocate(3)NAMEiarray_allocate - get pointer to nth element in iarraySYNTAX#include <iarray.h> void* iarray_allocate(iarray* x, size_t pos); iarray x; size_t pos; t* p = iarray_allocate(&x,pos);DESCRIPTIONiarray_allocate is similar to iarray_get, but if the requested element is not in the array, the array will be resized. If the resize fails, iarray_allocate returns NULL and leaves the array untouched. This function is safe to use in environments with multiple threads, but it can block for indeterminate time if other threads are reallocat- ing the array at the same time. Note that it is safe to use iarray_allocate where you would otherwise use iarray_get. The only reason to use iarray_get over iarray_allo- cate would be optimization.RETURN VALUEReturn a pointer to the requested element. If there was a memory allocation failure, returns NULL.SEE ALSOiarray_init(3), iarray_get(3), iarray_free(3) iarray_allocate(3)
Related Man Pages |
---|
lsearch(3) - mojave |
array_allocate(3) - debian |
xdf_get_chconf(3) - debian |
xdf_set_chconf(3) - debian |
lfind(3) - osx |
Similar Topics in the Unix Linux Community |
---|
Adding the individual columns of a matrix. |
Installing Dash Shell on OS X Lion |
Introduction |
New UNIX and Linux History Sections |
My first PERL incarnation... Audio Oscillograph |