source:
proiecte/swift/trunk/lib/hoard-371/src/heaplayers/experimental/cacheheap.h
@
176
Last change on this file since 176 was 176, checked in by , 14 years ago | |
---|---|
File size: 360 bytes |
Rev | Line | |
---|---|---|
[176] | 1 | /* -*- C++ -*- */ |
2 | ||
3 | #ifndef _CACHEHEAP_H_ | |
4 | #define _CACHEHEAP_H_ | |
5 | ||
6 | template <class Super> | |
7 | class CacheHeap : public Super { | |
8 | public: | |
9 | ||
10 | inline void * malloc (size_t sz) { | |
11 | void * ptr = mySuper.malloc (sz); | |
12 | return ptr; | |
13 | } | |
14 | ||
15 | inline void free (void * ptr) { | |
16 | // Insert checks here! | |
17 | mySuper.free (ptr); | |
18 | } | |
19 | ||
20 | private: | |
21 | ||
22 | Super mySuper; | |
23 | }; | |
24 | ||
25 | ||
26 | #endif |
Note: See TracBrowser
for help on using the repository browser.