git-svn-id: svn://ultimatepp.org/upp/trunk@8096 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-01-26 19:04:47 +00:00
parent 19603d994e
commit 4e828b5362
2 changed files with 32 additions and 0 deletions

23
upptst/Memory/Memory.cpp Normal file
View file

@ -0,0 +1,23 @@
#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));
}
CONSOLE_APP_MAIN
{
Test(200, 220);
Test(194, 204);
Test(2000, 2273);
Test(500000, 600000);
Test(500000, 500002);
}

9
upptst/Memory/Memory.upp Normal file
View file

@ -0,0 +1,9 @@
uses
Core;
file
Memory.cpp;
mainconfig
"" = "SSE2";