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 (none), 14 years ago
  • imported repo from "guagal"
File size: 360 bytes
Line 
1/* -*- C++ -*- */
2
3#ifndef _CACHEHEAP_H_
4#define _CACHEHEAP_H_
5
6template <class Super>
7class CacheHeap : public Super {
8public:
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 
20private:
21
22  Super mySuper;
23};
24
25
26#endif
Note: See TracBrowser for help on using the repository browser.