1 // BlockReferenceManager.h
3 #ifndef BLOCK_REFERENCE_MANAGER_H
4 #define BLOCK_REFERENCE_MANAGER_H
12 class BlockReferenceManager
{
14 BlockReferenceManager();
15 ~BlockReferenceManager();
17 BlockReference
*AllocateReference();
18 void FreeReference(BlockReference
*reference
);
21 bool CheckReference(BlockReference
*reference
);
22 void GetAllocationInfo(AllocationInfo
&info
);
30 Table() : fSize(0), fReferences(NULL
) {}
31 Table(int) : fSize(0), fReferences(NULL
) {}
34 status_t
Init(int32 size
);
36 BlockReference
*GetReferences() { return fReferences
; }
38 int32
GetSize() const { return fSize
; }
42 BlockReference
*fReferences
;
46 BlockReference
*fFreeList
;
49 #endif // BLOCK_REFERENCE_MANAGER_H