ultimatepp/upptst/Memory/Memory.cpp
cxl 678c83bcd1 .upptst
git-svn-id: svn://ultimatepp.org/upp/trunk@8100 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2015-01-26 19:26:38 +00:00

26 lines
454 B
C++

#include <Core/Core.h>
using namespace Upp;
void Test(int ini, int re)
{
RLOG("----------");
RLOG("Test trying realloc from " << ini << " to " << re);
byte *h = new byte[ini];
RDUMP(GetMemoryBlockSize(h));
RDUMP(TryRealloc(h, re));
RDUMP(GetMemoryBlockSize(h));
delete[] h;
}
CONSOLE_APP_MAIN
{
Test(200, 220);
Test(194, 204);
Test(2000, 2070);
Test(2000, 2273);
Test(500000, 600000);
Test(500000, 500002);
}