Adding support for windows and fixing some errors

This commit is contained in:
Ilusha 2024-01-15 16:35:16 -08:00 committed by Ilya Shurupov
parent 7660d58f26
commit 420bb37039
84 changed files with 168 additions and 255 deletions

View file

@ -2,5 +2,7 @@
#include "Common.hpp"
#ifndef ENV_OS_WINDOWS
inline void* operator new(std::size_t aSize, void* aWhere) noexcept { return aWhere; }
inline void* operator new[](std::size_t aSize, void* aWhere) noexcept { return aWhere; }
#endif

View file

@ -200,7 +200,7 @@ private:
}
};
const ualni size = 1000;
const ualni size = 500;
template <typename Alloc>
void testAlloc() {
@ -214,7 +214,7 @@ void testAlloc() {
TEST_DEF_STATIC(GlobalHeap) { testAlloc<HeapAllocGlobal>(); }
TEST_DEF_STATIC(Heap) { testAlloc<HeapAlloc>(); }
TEST_DEF_STATIC(Heap) { testAlloc<tp::HeapAlloc>(); }
TEST_DEF_STATIC(Chunk) {
testAlloc<ChunkAlloc<TestStruct, size>>();