23 virtual cudaError_t
Malloc(
size_t size,
void** p) = 0;
24 virtual bool Free(
void* p) = 0;
25 virtual void Clear() = 0;
41 virtual cudaError_t
Malloc(
size_t size,
void** p);
42 virtual bool Free(
void* p);
55 virtual cudaError_t
Malloc(
size_t size,
void** p);
56 virtual bool Free(
void* p);
67 _maxObjectSize = maxObjectSize;
72 static const int NumBuckets = 84;
73 static const size_t BucketSizes[NumBuckets];
76 typedef std::list<MemNode> MemList;
77 typedef std::map<void*, MemList::iterator> AddressMap;
78 typedef std::multimap<int, MemList::iterator> PriorityMap;
81 AddressMap::iterator address;
82 PriorityMap::iterator priority;
86 void Compact(
size_t extra);
87 void FreeNode(MemList::iterator memIt);
88 int LocateBucket(
size_t size)
const;
90 AddressMap _addressMap;
91 PriorityMap _priorityMap;
92 MemList _memLists[NumBuckets + 1];
94 size_t _maxObjectSize, _capacity, _allocated, _committed;