Mercurial > hg > xemacs-beta
comparison src/sheap.c @ 259:11cf20601dec r20-5b28
Import from CVS: tag r20-5b28
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:23:02 +0200 |
parents | 677f6a0ee643 |
children | 727739f917cb |
comparison
equal
deleted
inserted
replaced
258:58424f6abf56 | 259:11cf20601dec |
---|---|
27 #ifdef MULE | 27 #ifdef MULE |
28 #define STATIC_HEAP_BASE 0x500000 | 28 #define STATIC_HEAP_BASE 0x500000 |
29 #define STATIC_HEAP_SLOP 0x30000 | 29 #define STATIC_HEAP_SLOP 0x30000 |
30 #else | 30 #else |
31 #define STATIC_HEAP_BASE 0x400000 | 31 #define STATIC_HEAP_BASE 0x400000 |
32 #define STATIC_HEAP_SLOP 0x20000 | 32 #define STATIC_HEAP_SLOP 0x30000 |
33 #endif | 33 #endif |
34 #define STATIC_HEAP_SIZE \ | 34 #define STATIC_HEAP_SIZE \ |
35 (STATIC_HEAP_BASE + SHEAP_ADJUSTMENT + STATIC_HEAP_SLOP) | 35 (STATIC_HEAP_BASE + SHEAP_ADJUSTMENT + STATIC_HEAP_SLOP) |
36 #define BLOCKSIZE (1<<12) | 36 #define BLOCKSIZE (1<<12) |
37 #define ALLOC_UNIT (BLOCKSIZE-1) | 37 #define ALLOC_UNIT (BLOCKSIZE-1) |
82 { | 82 { |
83 if (static_heap_ptr + size >= static_heap_base + static_heap_size) | 83 if (static_heap_ptr + size >= static_heap_base + static_heap_size) |
84 { | 84 { |
85 printf( | 85 printf( |
86 | 86 |
87 "\nRequested %d bytes, static heap exhausted! base is %p,\n | 87 "\nRequested %d bytes, static heap exhausted! base is %p, current ptr |
88 current ptr is %p. You have exhausted the static heap, if\n | 88 is %p. You have exhausted the static heap, if you want to run temacs, |
89 you want to run temacs, adjust sheap-adjust.h to 0 or a +ve\n | 89 adjust sheap-adjust.h to 0 or a +ve number. If you are dumping then |
90 number. If you are dumping then STATIC_HEAP_SLOP is too\n | 90 STATIC_HEAP_SLOP is too small. Generally you should *not* try to run |
91 small. Generally you should *not* try to run temacs with a\n | 91 temacs with a static heap, you should dump first.\n", size, |
92 static heap, you should dump first.", size, | |
93 static_heap_base, static_heap_ptr); | 92 static_heap_base, static_heap_ptr); |
94 | 93 |
95 exit(-1); | 94 exit(-1); |
96 return 0; | 95 return 0; |
97 } | 96 } |
115 "\tAutomatically generated by XEmacs */\n" | 114 "\tAutomatically generated by XEmacs */\n" |
116 "# define SHEAP_ADJUSTMENT (%d)\n", | 115 "# define SHEAP_ADJUSTMENT (%d)\n", |
117 ((static_heap_ptr - static_heap_buffer) - STATIC_HEAP_BASE)); | 116 ((static_heap_ptr - static_heap_buffer) - STATIC_HEAP_BASE)); |
118 fclose (stream); | 117 fclose (stream); |
119 } | 118 } |
119 |