Mercurial > hg > Game > Cerium
view TaskManager/kernel/memory/MemHash.h @ 1546:61164c687b29 draft
fix GpuScheduler flip
author | Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 05 Feb 2013 13:15:46 +0900 |
parents | 1ede991d6da3 |
children |
line wrap: on
line source
#ifndef INCLUDED_MEM_HASH #define INCLUDED_MEM_HASH #include "MemorySegment.h" class MemHash { public: MemHash(void); private: MemorySegmentPtr *table; public: void clear(void); unsigned int hash(memaddr data); int put(memaddr addr, MemorySegmentPtr ms); MemorySegmentPtr get(memaddr addr); void remove(memaddr addr); }; typedef MemHash* MemHashPtr; const int hashSize = 263; //const int hashSize = 1; const int tableSize = sizeof(MemorySegmentPtr)*hashSize; #endif