* lib/ialloc.h (imalloc, irealloc, icalloc): Add comment that
deallocation must happen through 'free'.
+2021-08-07 Bruno Haible <bruno@clisp.org>
+
+ ialloc: Prepare for allocation-deallocation checking.
+ * lib/ialloc.h (imalloc, irealloc, icalloc): Add comment that
+ deallocation must happen through 'free'.
+
2021-08-07 Bruno Haible <bruno@clisp.org>
aligned-malloc: Prepare for allocation-deallocation checking.
return NULL;
}
-IALLOC_INLINE void *
+IALLOC_INLINE
+_GL_ATTRIBUTE_MALLOC /*_GL_ATTRIBUTE_DEALLOC_FREE*/
+void *
imalloc (idx_t s)
{
return s <= SIZE_MAX ? malloc (s) : _gl_alloc_nomem ();
}
-IALLOC_INLINE void *
+IALLOC_INLINE
+/*_GL_ATTRIBUTE_DEALLOC_FREE*/
+void *
irealloc (void *p, idx_t s)
{
/* Work around GNU realloc glitch by treating a zero size as if it
return s <= SIZE_MAX ? realloc (p, s | !s) : _gl_alloc_nomem ();
}
-IALLOC_INLINE void *
+IALLOC_INLINE
+_GL_ATTRIBUTE_MALLOC /*_GL_ATTRIBUTE_DEALLOC_FREE*/
+void *
icalloc (idx_t n, idx_t s)
{
if (SIZE_MAX < n)