mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Add member template MallocAllocator::Allocate(Num) (to match the same function in BumpPtrAllocator).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62202 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
92c6bd2c45
commit
07c2a78c2b
@ -31,6 +31,11 @@ public:
|
||||
template <typename T>
|
||||
T *Allocate() { return static_cast<T*>(malloc(sizeof(T))); }
|
||||
|
||||
template <typename T>
|
||||
T *Allocate(size_t Num) {
|
||||
return static_cast<T*>(malloc(sizeof(T)*Num));
|
||||
}
|
||||
|
||||
void Deallocate(void *Ptr) { free(Ptr); }
|
||||
|
||||
void PrintStats() const {}
|
||||
|
Loading…
Reference in New Issue
Block a user