1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-05 15:56:00 +02:00

Compiler performance enhancements

This commit is contained in:
Brian Fiete 2022-05-06 11:28:38 -07:00
parent 3736281ff7
commit d623c21495
22 changed files with 679 additions and 291 deletions

View file

@ -255,11 +255,11 @@ class BumpAllocator : public BumpAllocatorT<0x2000>
};
template <typename T>
template <typename T, int ALLOC_SIZE = 0x2000>
class AllocatorBump
{
public:
BumpAllocator* mAlloc;
BumpAllocatorT<ALLOC_SIZE>* mAlloc;
AllocatorBump()
{
@ -286,6 +286,27 @@ public:
}
};
template <int ALLOC_SIZE = 0x2000>
class RawAllocatorBump
{
public:
BumpAllocatorT<ALLOC_SIZE>* mAlloc;
RawAllocatorBump()
{
mAlloc = NULL;
}
void* rawAllocate(intptr size)
{
return mAlloc->AllocBytes(size, 16);
}
void rawDeallocate(void* ptr)
{
}
};
NS_BF_END