comparison src/ralloc.c @ 44:8d2a9b52c682 r19-15prefinal

Import from CVS: tag r19-15prefinal
author cvs
date Mon, 13 Aug 2007 08:55:10 +0200
parents 859a2309aef8
children 131b0175ea99
comparison
equal deleted inserted replaced
43:23cafc5d2038 44:8d2a9b52c682
755 755
756 /* Compute the hash value for an address. */ 756 /* Compute the hash value for an address. */
757 static int 757 static int
758 MHASH (VM_ADDR addr) 758 MHASH (VM_ADDR addr)
759 { 759 {
760 #if (LONGBITS == 64)
761 unsigned long int addr_shift = (unsigned long int)(addr) >> USELESS_LOWER_ADDRESS_BITS;
762 #else
760 unsigned int addr_shift = (unsigned int)(addr) >> USELESS_LOWER_ADDRESS_BITS; 763 unsigned int addr_shift = (unsigned int)(addr) >> USELESS_LOWER_ADDRESS_BITS;
764 #endif
761 int hval = addr_shift % MHASH_PRIME; /* We could have addresses which are -ve 765 int hval = addr_shift % MHASH_PRIME; /* We could have addresses which are -ve
762 when converted to signed ints */ 766 when converted to signed ints */
763 return ((hval >= 0) ? hval : MHASH_PRIME + hval); 767 return ((hval >= 0) ? hval : MHASH_PRIME + hval);
764 } 768 }
765 769