Hash :
61d86624
Author :
Date :
2021-06-11T17:18:57
xalloc: new idx_t-based allocators This is for code that prefers to use idx_t for sizes. * lib/xalloc.h (ximalloc, xizalloc, xicalloc, xirealloc) (xireallocarray, ximemdup, ximemdup0) [GNULIB_XALLOC]: New decls. (x2nrealloc): Now just a decl, as the body is moved into xmalloc.c. * lib/xmalloc.c: Include ialloc.h. Rename some local parameters to be consistent with the .h files. (nonnull): New static function. (xmalloc, xcalloc): Simplify by using nonnull. (ximalloc, xirealloc, xireallocarray, xizalloc, xicalloc) (ximemdup, ximemdup0): New functions. (x2nrealloc): Moved here from xalloc.h. * modules/xalloc (Depends-on): Add ialloc.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
Description:
Memory allocation with out-of-memory checking. Also see xalloc-die.
Files:
lib/xalloc.h
lib/xmalloc.c
m4/xalloc.m4
Depends-on:
c99
calloc-gnu
extern-inline
ialloc
idx
intprops
malloc-gnu
minmax
realloc-gnu
reallocarray
stdint
xalloc-die
configure.ac:
gl_XALLOC
gl_MODULE_INDICATOR([xalloc])
Makefile.am:
lib_SOURCES += xmalloc.c
Include:
"xalloc.h"
License:
GPL
Maintainer:
all