Mercurial > hg > Game > Cerium
view TaskManager/kernel/memory/MemHash.h @ 2069:26aa08c9a1de draft default tip
cuda example fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 12 Feb 2017 10:04:55 +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