From 4e828b536220b3b0d44545f5066a667ad89abe99 Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 26 Jan 2015 19:04:47 +0000 Subject: [PATCH] .upptst git-svn-id: svn://ultimatepp.org/upp/trunk@8096 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- upptst/Memory/Memory.cpp | 23 +++++++++++++++++++++++ upptst/Memory/Memory.upp | 9 +++++++++ 2 files changed, 32 insertions(+) create mode 100644 upptst/Memory/Memory.cpp create mode 100644 upptst/Memory/Memory.upp diff --git a/upptst/Memory/Memory.cpp b/upptst/Memory/Memory.cpp new file mode 100644 index 000000000..728a07fe7 --- /dev/null +++ b/upptst/Memory/Memory.cpp @@ -0,0 +1,23 @@ +#include + +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); +} diff --git a/upptst/Memory/Memory.upp b/upptst/Memory/Memory.upp new file mode 100644 index 000000000..06bbf35d4 --- /dev/null +++ b/upptst/Memory/Memory.upp @@ -0,0 +1,9 @@ +uses + Core; + +file + Memory.cpp; + +mainconfig + "" = "SSE2"; +