Rev | Line | |
---|
[176] | 1 | #ifndef _EMPTYHOARDMANAGER_H_ |
---|
| 2 | #define _EMPTYHOARDMANAGER_H_ |
---|
| 3 | |
---|
| 4 | #include "basehoardmanager.h" |
---|
| 5 | #include "sassert.h" |
---|
| 6 | |
---|
| 7 | template <class SuperblockType_> |
---|
| 8 | class EmptyHoardManager : public BaseHoardManager<SuperblockType_> { |
---|
| 9 | public: |
---|
| 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 | |
---|
| 32 | private: |
---|
| 33 | |
---|
| 34 | unsigned long _magic; |
---|
| 35 | |
---|
| 36 | }; |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.