Expand description
Memory allocation functions.
Functions§
- pa_
xfree ⚠ - Frees allocated memory.
- pa_
xmalloc ⚠ - Allocates the specified number of bytes, just like
malloc()does. However, in case of OOM, terminate. - pa_
xmalloc0 ⚠ - Same as
pa_xmalloc(), but initializes allocated memory to 0. - pa_
xmemdup ⚠ - Duplicates the specified memory block.
- pa_xnew⚠
- Allocates
nnew structures of the specified type. - pa_
xnew0 ⚠ - Same as
pa_xnew()but sets the memory to zero. - pa_
xnewdup ⚠ - Same as
pa_xnew()but duplicates the specified data. - pa_
xrealloc ⚠ - The combination of
pa_xmalloc()andrealloc(). - pa_
xrenew ⚠ - Reallocates
nnew structures of the specified type. - pa_
xstrdup ⚠ - Duplicates the specified string, allocating memory with
pa_xmalloc(). - pa_
xstrndup ⚠ - Duplicates the specified string, but truncate after
lcharacters.