cygwin) hybrid_malloc=yes;;
esac
+if test "${system_malloc}" != yes && test "${doug_lea_malloc}" != yes \
+ && test "${UNEXEC_OBJ}" = unexelf.o && test "${hybrid_malloc}" != no; then
+ hybrid_malloc=yes
+fi
+
GMALLOC_OBJ=
+SHEAP_OBJ=
if test "${system_malloc}" = "yes"; then
AC_DEFINE([SYSTEM_MALLOC], 1,
[Define to 1 to use the system memory allocator, even if it is not
GNU_MALLOC=
GNU_MALLOC_reason="only before dumping"
GMALLOC_OBJ=gmalloc.o
+ SHEAP_OBJ=sheap.o
VMLIMIT_OBJ=
else
test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
fi
fi
AC_SUBST(GMALLOC_OBJ)
+AC_SUBST(SHEAP_OBJ)
AC_SUBST(VMLIMIT_OBJ)
-if test "$doug_lea_malloc" = "yes" ; then
+if test "$doug_lea_malloc" = "yes" && test "$hybrid_malloc" != yes; then
if test "$GNU_MALLOC" = yes ; then
GNU_MALLOC_reason="
(Using Doug Lea's new malloc from the GNU C Library.)"
AC_SUBST(RALLOC_OBJ)
if test "$opsys" = "cygwin"; then
- CYGWIN_OBJ="sheap.o cygw32.o"
+ CYGWIN_OBJ="cygw32.o"
## Cygwin differs because of its unexec().
PRE_ALLOC_OBJ=
POST_ALLOC_OBJ=lastfile.o
## widget.o if USE_X_TOOLKIT, otherwise empty.
WIDGET_OBJ=@WIDGET_OBJ@
-## sheap.o if CYGWIN, otherwise empty.
+## sheap.o if HYBRID_MALLOC, otherwise empty.
+SHEAP_OBJ=@SHEAP_OBJ@
+
+## cygw32.o if CYGWIN, otherwise empty.
CYGWIN_OBJ=@CYGWIN_OBJ@
## fontset.o fringe.o image.o if we have any window system
doprnt.o intervals.o textprop.o composite.o xml.o $(NOTIFY_OBJ) \
$(XWIDGETS_OBJ) \
profiler.o decompress.o \
+ $(SHEAP_OBJ) \
$(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) \
$(W32_OBJ) $(WINDOW_SYSTEM_OBJ) $(XGSELOBJ)
obj = $(base_obj) $(NS_OBJC_OBJ)
#define aligned_alloc galigned_alloc
#define free gfree
-#ifdef CYGWIN
+#ifdef HYBRID_MALLOC
extern void *bss_sbrk (ptrdiff_t size);
extern int bss_sbrk_did_unexec;
extern char bss_sbrk_buffer[];
__default_morecore (ptrdiff_t increment)
{
void *result;
-#if defined (CYGWIN)
+#ifdef HYBRID_MALLOC
if (!DUMPED)
{
return bss_sbrk (increment);