X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fgmalloc.c;h=a65e78edca2529129cd4c5d4a15b6dc274042e09;hb=983b60ac9125c90a69d4d62e58e50cfd657fbe3a;hp=472bd3f9dedd8ba5aa2542c1a8201bec91cd20fd;hpb=3e447015251ce6dcde843cbed10d9033d5538622;p=chise%2Fxemacs-chise.git.1 diff --git a/src/gmalloc.c b/src/gmalloc.c index 472bd3f..a65e78e 100644 --- a/src/gmalloc.c +++ b/src/gmalloc.c @@ -367,7 +367,7 @@ Boston, MA 02111-1307, USA. #endif /* How to really get more memory. */ -#ifdef HEAP_IN_DATA +#if defined (HEAP_IN_DATA) && !defined(PDUMP) /* once dumped, free() & realloc() on static heap space will fail */ #define PURE_DATA(x) \ ((static_heap_dumped && (char*)x >= static_heap_base \ @@ -446,7 +446,7 @@ static int initialize __P ((void)); static int initialize () { -#ifdef HEAP_IN_DATA +#if defined (HEAP_IN_DATA) && !defined(PDUMP) if (static_heap_dumped && __morecore == more_static_core) { __morecore = __default_morecore; @@ -1036,7 +1036,7 @@ realloc (__ptr_t ptr, __malloc_size_t size) int type; __malloc_size_t block, blocks, oldlimit; - if (PURE_DATA(ptr)) + if (PURE_DATA (ptr)) { result = malloc (size); memcpy(result, ptr, size); @@ -1232,23 +1232,9 @@ extern __ptr_t __sbrk __P ((int increment)); and return the start of data space, or NULL on errors. If INCREMENT is negative, shrink data space. */ __ptr_t -__default_morecore ( -#ifdef __STDC__ - ptrdiff_t increment -#else -#ifdef OSF1 - long increment -#else - int increment -#endif -#endif - ) +__default_morecore (ptrdiff_t increment) { -#ifdef OSF1 - __ptr_t result = (__ptr_t) __sbrk ((ssize_t) increment); -#else - __ptr_t result = (__ptr_t) __sbrk ((int) increment); -#endif + __ptr_t result = (__ptr_t) __sbrk (increment); if (result == (__ptr_t) -1) return NULL; return result;