GMALLOC_OBJ=gmalloc.o
VMLIMIT_OBJ=
else
- test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
+ if test "$doug_lea_malloc" != "yes"; then
+ GMALLOC_OBJ=gmalloc.o
+ AC_CHECK_DECLS([valloc])
+ fi
VMLIMIT_OBJ=vm-limit.o
AC_CHECK_HEADERS([sys/vlimit.h])
#endif
#ifdef emacs
-extern void emacs_abort (void);
+extern _Noreturn void emacs_abort (void) NO_INLINE;
#endif
/* If HYBRID_MALLOC is defined, then temacs will use malloc,
#undef malloc
#undef realloc
#undef calloc
+#undef aligned_alloc
#undef free
#define malloc gmalloc
#define realloc grealloc
extern void free (void *ptr);
/* Allocate SIZE bytes allocated to ALIGNMENT bytes. */
-#ifdef MSDOS
extern void *aligned_alloc (size_t, size_t);
extern void *memalign (size_t, size_t);
+#ifdef MSDOS
extern int posix_memalign (void **, size_t, size_t);
#endif
extern void malloc_enable_thread (void);
#endif
-#ifdef emacs
-extern void emacs_abort (void);
-#endif
-
/* The allocator divides the heap into blocks of fixed size; large
requests receive one or more whole blocks, and small requests
receive a fragment of a block. Fragment sizes are powers of two,
or (US mail) as Mike Haertel c/o Free Software Foundation. */
/* Allocate SIZE bytes on a page boundary. */
+#ifndef HAVE_DECL_VALLOC
extern void *valloc (size_t);
+#endif
#if defined _SC_PAGESIZE || !defined HAVE_GETPAGESIZE
# include "getpagesize.h"
#endif
}
#endif
-
+
void *
hybrid_realloc (void *ptr, size_t size)
{