Mercurial > hg > xemacs-beta
diff src/sheap.c @ 1157:6af03f821bbe
[xemacs-hg @ 2002-12-13 04:29:06 by andyp]
static heap fiuxups
author | andyp |
---|---|
date | Fri, 13 Dec 2002 04:30:18 +0000 |
parents | 184461bc8de4 |
children | 70921960b980 |
line wrap: on
line diff
--- a/src/sheap.c Thu Dec 12 22:53:10 2002 +0000 +++ b/src/sheap.c Fri Dec 13 04:30:18 2002 +0000 @@ -27,7 +27,7 @@ #include <sheap-adjust.h> #define STATIC_HEAP_BASE 0x800000 -#define STATIC_HEAP_SLOP 0x500000 +#define STATIC_HEAP_SLOP 0x40000 #define STATIC_HEAP_SIZE \ (STATIC_HEAP_BASE + SHEAP_ADJUSTMENT + STATIC_HEAP_SLOP) #define BLOCKSIZE (1<<12) @@ -129,17 +129,17 @@ Bytecount lost = STATIC_HEAP_SIZE - (static_heap_ptr - static_heap_buffer); char buf[200]; - sprintf (buf, "Static heap usage: %ld of %ld, slop is %ld", - (long) (static_heap_ptr - static_heap_buffer), - (long) (STATIC_HEAP_SIZE), - (long) STATIC_HEAP_SLOP); + sprintf (buf, "Static heap usage: %ldk of %ldk, slop is %ldk", + (long) ((static_heap_ptr - static_heap_buffer) /1024), + (long) (STATIC_HEAP_SIZE / 1024), + (long) STATIC_HEAP_SLOP / 1024); if (lost > STATIC_HEAP_SLOP) { sprintf (buf + strlen (buf), " -- %ldk wasted", (long)(lost/1024)); if (die_if_pure_storage_exceeded) { sheap_adjust_h(STATIC_HEAP_SLOP - lost); sprintf (buf + strlen (buf), " -- reset to %ldk", - (long) (STATIC_HEAP_SIZE + STATIC_HEAP_SLOP - lost)); + (long) ((STATIC_HEAP_SIZE + STATIC_HEAP_SLOP - lost) / 1024)); rc = -1; } message ("%s", buf);