Supply malloc and alloc_size attributes for extern allocators.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 22 May 2014 16:40:35 +0000 (09:40 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 22 May 2014 16:40:35 +0000 (09:40 -0700)
commit74fde0f44f68a14d920db4d24626984e2964368d
treece487b5a0080a9a9abbef810f93bb19069defe95
parentbbd03f131a88ab1ff993bb6bba1bea93e7ee17ea
Supply malloc and alloc_size attributes for extern allocators.

This documents the C API, and helps GCC generate a bit better code.
* conf_post.h (ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE)
(ATTRIBUTE_MALLOC_SIZE): New macros.
* gmalloc.c (malloc, realloc, calloc):
* gtkutil.h (malloc_widget_value):
* lisp.h (ralloc, r_re_alloc, xmalloc, xzalloc, xrealloc, xnmalloc)
(xnrealloc, xstrdup, xlispstrdup, record_xmalloc):
Use them.
src/ChangeLog
src/conf_post.h
src/gmalloc.c
src/gtkutil.h
src/lisp.h