diff --git a/upptst/Realloc/Realloc.cpp b/upptst/Realloc/Realloc.cpp new file mode 100644 index 000000000..fd2bdc205 --- /dev/null +++ b/upptst/Realloc/Realloc.cpp @@ -0,0 +1,19 @@ +#include + +using namespace Upp; + +CONSOLE_APP_MAIN +{ + void *ptr = MemoryAlloc(400); + DDUMP(TryRealloc(ptr, 420)); + DDUMP(TryRealloc(ptr, 1000)); + + MemoryFree(ptr); + + ptr = MemoryAlloc(2000); + DDUMP(TryRealloc(ptr, 4000)); + DDUMP(TryRealloc(ptr, 200)); + DDUMP(TryRealloc(ptr, 200000)); + + MemoryFree(ptr); +} diff --git a/upptst/Realloc/Realloc.upp b/upptst/Realloc/Realloc.upp new file mode 100644 index 000000000..8bb3fe36f --- /dev/null +++ b/upptst/Realloc/Realloc.upp @@ -0,0 +1,9 @@ +uses + Core; + +file + Realloc.cpp; + +mainconfig + "" = ""; +