X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fralloc.c;h=623d6a4f21247910f8b719b9918ec594deff2bef;hb=a01617917f7da6387cac7ca2853fe5ed49977449;hp=9c9b798d62022cb3a6204a50374b6becd8af9e8b;hpb=716cfba952c1dc0d2cf5c968971f3780ba728a89;p=chise%2Fxemacs-chise.git.1 diff --git a/src/ralloc.c b/src/ralloc.c index 9c9b798..623d6a4 100644 --- a/src/ralloc.c +++ b/src/ralloc.c @@ -103,7 +103,7 @@ static POINTER virtual_break_value; static POINTER break_value; /* This is the size of a page. We round memory requests to this boundary. */ -static int page_size; +static size_t page_size; /* Whenever we get memory from the system, get this many extra bytes. This must be a multiple of page_size. */ @@ -889,7 +889,7 @@ r_alloc_sbrk (ptrdiff_t size) } else /* size < 0 */ { - size_t excess = (char *)first_heap->bloc_start + EMACS_INT excess = (char *)first_heap->bloc_start - ((char *)virtual_break_value + size); address = virtual_break_value; @@ -1319,7 +1319,7 @@ r_alloc_check (void) #include typedef void *VM_ADDR; /* VM addresses */ -static CONST VM_ADDR VM_FAILURE_ADDR = (VM_ADDR) -1; /* mmap returns this when it fails. */ +static const VM_ADDR VM_FAILURE_ADDR = (VM_ADDR) -1; /* mmap returns this when it fails. */ /* Configuration for relocating allocator. */ @@ -1438,7 +1438,7 @@ typedef struct alloc_dll static MMAP_HANDLE mmap_start = 0; /* Head of linked list */ static size_t page_size = 0; /* Size of VM pages */ -static int mmap_hysteresis; /* Should be size_t, really. */ +static Fixnum mmap_hysteresis; /* Logically a "size_t" */ /* Get a new handle for a fresh block. */ static MMAP_HANDLE @@ -1726,7 +1726,7 @@ Addr_Block_initialize (void) addr_chain = (ADDRESS_CHAIN) UNDERLYING_MALLOC( sizeof( ADDRESS_BLOCK )); addr_chain->next = 0; /* Last block in chain */ addr_chain->sz = 0x0c000000; /* Size */ - addr_chain->addr = (POINTER) (0x04000000 | DATA_SEG_BITS); + addr_chain->addr = (POINTER) (0x04000000); addr_chain->flag = empty; } @@ -2022,6 +2022,10 @@ init_ralloc (void) if (r_alloc_initialized > 1) return; /* used to return 1 */ +#ifdef PDUMP + /* Under pdump, we need to activate ralloc on the first go. */ + ++r_alloc_initialized; +#endif if (++r_alloc_initialized == 1) return; /* used to return 1 */