Mercurial > hg > xemacs-beta
changeset 4125:93bd75c45dca
[xemacs-hg @ 2007-08-17 10:16:46 by crestani]
2007-08-17 Marcus Crestani <crestani@xemacs.org>
* mc-alloc.c (L1_INDEX):
* mc-alloc.c (PAGE_SIZE_ALIGNMENT):
* mc-alloc.c (set_bit):
* mc-alloc.c (init_mc_allocator): Use EMACS_UINT with bit
shifting.
author | crestani |
---|---|
date | Fri, 17 Aug 2007 10:16:48 +0000 |
parents | 9a633a00c3f2 |
children | 8dc912501694 |
files | src/ChangeLog src/mc-alloc.c |
diffstat | 2 files changed, 14 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Fri Aug 17 08:08:10 2007 +0000 +++ b/src/ChangeLog Fri Aug 17 10:16:48 2007 +0000 @@ -1,3 +1,11 @@ +2007-08-17 Marcus Crestani <crestani@xemacs.org> + + * mc-alloc.c (L1_INDEX): + * mc-alloc.c (PAGE_SIZE_ALIGNMENT): + * mc-alloc.c (set_bit): + * mc-alloc.c (init_mc_allocator): Use EMACS_UINT with bit + shifting. + 2007-08-15 Marcus Crestani <crestani@xemacs.org> * database.c (dbm_map): Add typecast.
--- a/src/mc-alloc.c Fri Aug 17 08:08:10 2007 +0000 +++ b/src/mc-alloc.c Fri Aug 17 10:16:48 2007 +0000 @@ -179,11 +179,11 @@ #ifdef USE_HASH_TABLE # define HASH(hi) ((hi) & (LEVEL1_SIZE - 1)) -# define L1_INDEX(p) HASH ((EMACS_INT) p >> (LOG_LEVEL2_SIZE + LOG_PAGE_SIZE)) +# define L1_INDEX(p) HASH ((EMACS_UINT) p >> (LOG_LEVEL2_SIZE + LOG_PAGE_SIZE)) #else -# define L1_INDEX(p) ((EMACS_INT) p >> (LOG_LEVEL2_SIZE + LOG_PAGE_SIZE)) +# define L1_INDEX(p) ((EMACS_UINT) p >> (LOG_LEVEL2_SIZE + LOG_PAGE_SIZE)) #endif -#define L2_INDEX(p) (((EMACS_INT) p >> LOG_PAGE_SIZE) & (LEVEL2_SIZE - 1)) +#define L2_INDEX(p) (((EMACS_UINT) p >> LOG_PAGE_SIZE) & (LEVEL2_SIZE - 1)) @@ -393,7 +393,7 @@ #define BYTES_TO_PAGES(bytes) (div_PAGE_SIZE ((bytes + (PAGE_SIZE - 1)))) #define PAGE_SIZE_ALIGNMENT(address) \ - (void *) ((((EMACS_INT) (address)) + PAGE_SIZE) & ~(PAGE_SIZE - 1)) + (void *) ((((EMACS_UINT) (address)) + PAGE_SIZE) & ~(PAGE_SIZE - 1)) #define PH_ON_FREE_LIST_P(ph) \ (ph && PH_PLH (ph) && (PLH_LIST_TYPE (PH_PLH (ph)) == FREE_LIST)) @@ -618,7 +618,7 @@ /* Bit_Arrays bit at pos to val. */ static void -set_bit (Rawbyte *bit_array, EMACS_INT pos, EMACS_INT val) +set_bit (Rawbyte *bit_array, EMACS_INT pos, EMACS_UINT val) { #if N_MARK_BITS > 1 EMACS_INT i; @@ -1648,7 +1648,7 @@ ABORT (); } - page_size_div_2 = (EMACS_INT) SYS_PAGE_SIZE >> 1; + page_size_div_2 = (EMACS_UINT) SYS_PAGE_SIZE >> 1; mc_allocator_globals.used_heap_pages = (page_list_header *) xmalloc_and_zero ((N_USED_PAGE_LISTS + 1)