diff options
author | Kenichi Handa <handa@m17n.org> | 2004-04-16 12:51:06 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2004-04-16 12:51:06 +0000 |
commit | 6b61353c0a0320ee15bb6488149735381fed62ec (patch) | |
tree | e69adba60e504a5a37beb556ad70084de88a7aab /src/gmalloc.c | |
parent | dc6a28319312fe81f7a1015e363174022313f0bd (diff) | |
download | emacs-6b61353c0a0320ee15bb6488149735381fed62ec.tar.gz emacs-6b61353c0a0320ee15bb6488149735381fed62ec.tar.bz2 emacs-6b61353c0a0320ee15bb6488149735381fed62ec.zip |
Sync to HEAD
Diffstat (limited to 'src/gmalloc.c')
-rw-r--r-- | src/gmalloc.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gmalloc.c b/src/gmalloc.c index 7c654e1ece1..eae83a74eb6 100644 --- a/src/gmalloc.c +++ b/src/gmalloc.c @@ -352,6 +352,10 @@ Cambridge, MA 02139, USA. #include <errno.h> /* How to really get more memory. */ +#if defined(CYGWIN) +extern __ptr_t bss_sbrk PP ((ptrdiff_t __size)); +extern int bss_sbrk_did_unexec; +#endif __ptr_t (*__morecore) PP ((ptrdiff_t __size)) = __default_morecore; /* Debugging hook for `malloc'. */ @@ -1572,7 +1576,14 @@ __ptr_t __default_morecore (increment) __malloc_ptrdiff_t increment; { - __ptr_t result = (__ptr_t) __sbrk (increment); + __ptr_t result; +#if defined(CYGWIN) + if (!bss_sbrk_did_unexec) + { + return bss_sbrk (increment); + } +#endif + result = (__ptr_t) __sbrk (increment); if (result == (__ptr_t) -1) return NULL; return result; @@ -1978,3 +1989,6 @@ mprobe (__ptr_t ptr) } #endif /* GC_MCHECK */ + +/* arch-tag: 93dce5c0-f49a-41b5-86b1-f91c4169c02e + (do not change this comment) */ |