source: proiecte/swift/trunk/lib/hoard-371/src/emptyhoardmanager.h @ 176

Last change on this file since 176 was 176, checked in by (none), 14 years ago
  • imported repo from "guagal"
File size: 712 bytes
Line 
1#ifndef _EMPTYHOARDMANAGER_H_
2#define _EMPTYHOARDMANAGER_H_
3
4#include "basehoardmanager.h"
5#include "sassert.h"
6
7template <class SuperblockType_>
8class EmptyHoardManager : public BaseHoardManager<SuperblockType_> {
9public:
10
11  EmptyHoardManager (void)
12    : _magic (0x1d2d3d40)
13    {}
14
15  int isValid (void) const {
16    return (_magic == 0x1d2d3d40);
17  }
18
19  typedef SuperblockType_ SuperblockType;
20
21  void free (void *) { abort(); }
22  void lock (void) {}
23  void unlock (void) {}
24
25  SuperblockType * get (size_t, EmptyHoardManager *) { abort(); return NULL; }
26  void put (SuperblockType *, size_t) { abort(); }
27
28#if 0
29  void * malloc (size_t) { return NULL; }
30#endif
31
32private:
33
34  unsigned long _magic;
35
36};
37
38
39#endif
Note: See TracBrowser for help on using the repository browser.