Mercurial > hg > Members > kono > Cerium
changeset 878:6f0797d596bb
hash bug fixed(?)
author | kazz <kazz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 06 Jul 2010 10:39:41 +0900 |
parents | 65f0c4c7f381 |
children | 596009c66065 f525427ae30f |
files | TaskManager/kernel/memory/MemHash.cc |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/kernel/memory/MemHash.cc Tue Jul 06 09:55:35 2010 +0900 +++ b/TaskManager/kernel/memory/MemHash.cc Tue Jul 06 10:39:41 2010 +0900 @@ -74,14 +74,14 @@ MemorySegmentPtr MemHash::get(memaddr key) { - int hashval = hash(key); + unsigned int hashval = hash(key); for (int i = 0; i < hashSize/2; i++) { int index = (hashval + i*i)%hashSize; if (table[index] != NULL && table[index]->address == key) { -printf("get hash value %0x\n",index); +//printf("get hash value %0x\n",index); return table[index]; } } @@ -92,7 +92,7 @@ void MemHash::remove(memaddr key) { - int hashval = hash(key); + unsigned int hashval = hash(key); for (int i = 0; i < hashSize/2; i++) { int index = (hashval + i*i)%hashSize;