Mercurial > hg > xemacs-beta
comparison src/ralloc.c @ 442:abe6d1db359e r21-2-36
Import from CVS: tag r21-2-36
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:35:02 +0200 |
parents | 8de8e3f6228a |
children | c33ae14dd6d0 |
comparison
equal
deleted
inserted
replaced
441:72a7cfa4a488 | 442:abe6d1db359e |
---|---|
1317 #include <fcntl.h> | 1317 #include <fcntl.h> |
1318 #include <sys/mman.h> | 1318 #include <sys/mman.h> |
1319 #include <stdio.h> | 1319 #include <stdio.h> |
1320 | 1320 |
1321 typedef void *VM_ADDR; /* VM addresses */ | 1321 typedef void *VM_ADDR; /* VM addresses */ |
1322 static CONST VM_ADDR VM_FAILURE_ADDR = (VM_ADDR) -1; /* mmap returns this when it fails. */ | 1322 static const VM_ADDR VM_FAILURE_ADDR = (VM_ADDR) -1; /* mmap returns this when it fails. */ |
1323 | 1323 |
1324 /* Configuration for relocating allocator. */ | 1324 /* Configuration for relocating allocator. */ |
1325 | 1325 |
1326 /* #define MMAP_GENERATE_ADDRESSES */ | 1326 /* #define MMAP_GENERATE_ADDRESSES */ |
1327 /* Define this if you want Emacs to manage the address table. | 1327 /* Define this if you want Emacs to manage the address table. |
1724 { | 1724 { |
1725 MEMMETER( MVAL( M_Addrlist_Size )++) | 1725 MEMMETER( MVAL( M_Addrlist_Size )++) |
1726 addr_chain = (ADDRESS_CHAIN) UNDERLYING_MALLOC( sizeof( ADDRESS_BLOCK )); | 1726 addr_chain = (ADDRESS_CHAIN) UNDERLYING_MALLOC( sizeof( ADDRESS_BLOCK )); |
1727 addr_chain->next = 0; /* Last block in chain */ | 1727 addr_chain->next = 0; /* Last block in chain */ |
1728 addr_chain->sz = 0x0c000000; /* Size */ | 1728 addr_chain->sz = 0x0c000000; /* Size */ |
1729 addr_chain->addr = (POINTER) (0x04000000 | DATA_SEG_BITS); | 1729 addr_chain->addr = (POINTER) (0x04000000); |
1730 addr_chain->flag = empty; | 1730 addr_chain->flag = empty; |
1731 } | 1731 } |
1732 | 1732 |
1733 /* Coalesce address blocks if they are contiguous. Only empty and | 1733 /* Coalesce address blocks if they are contiguous. Only empty and |
1734 unavailable slots are coalesced. */ | 1734 unavailable slots are coalesced. */ |