Mercurial > hg > xemacs-beta
diff src/sheap.c @ 272:c5d627a313b1 r21-0b34
Import from CVS: tag r21-0b34
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:28:48 +0200 |
parents | b2472a1930f2 |
children | 90d73dddcdc4 |
line wrap: on
line diff
--- a/src/sheap.c Mon Aug 13 10:27:41 2007 +0200 +++ b/src/sheap.c Mon Aug 13 10:28:48 2007 +0200 @@ -22,7 +22,7 @@ #include <stdio.h> #include "lisp.h" #include <stddef.h> -#include "sheap-adjust.h" +#include <sheap-adjust.h> #define STATIC_HEAP_BASE 0x600000 #define STATIC_HEAP_SLOP 0x40000 @@ -44,7 +44,7 @@ { int size = (int) increment; void *result; - + if (!static_heap_initialized) { if (((unsigned long) static_heap_base & ~VALMASK) != 0) @@ -54,26 +54,26 @@ } static_heap_base=(char*)ALIGN_ALLOC(static_heap_buffer); static_heap_ptr=static_heap_base; - static_heap_size=STATIC_HEAP_SIZE - + static_heap_size=STATIC_HEAP_SIZE - (static_heap_base-static_heap_buffer); #ifdef __CYGWIN32__ sbrk(BLOCKSIZE); /* force space for fork to work */ #endif static_heap_initialized=1; } - + result = static_heap_ptr; /* we don't need to align - handled by gmalloc. */ - if (size < 0) + if (size < 0) { if (static_heap_ptr + size < static_heap_base) { return 0; } } - else + else { if (static_heap_ptr + size >= static_heap_base + static_heap_size) { @@ -91,7 +91,7 @@ } } static_heap_ptr += size; - + return result; }