mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-29 22:32:38 -06:00
.cosmetics
This commit is contained in:
parent
293f55d488
commit
bbe50dd4be
4 changed files with 0 additions and 0 deletions
17
benchmarks/GetMemoryBlockSize/GetMemoryBlockSize.cpp
Normal file
17
benchmarks/GetMemoryBlockSize/GetMemoryBlockSize.cpp
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
// TEST IN RELEASE MODE!
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
for(int q = 5; q < 500*1024*1024; q = q + 1 + q / 10) {
|
||||
size_t sz = q;
|
||||
void *ptr = MemoryAllocSz(sz);
|
||||
DLOG("Requested " << q << ", allocated " << sz << ", GetMemoryBlockSize " << GetMemoryBlockSize(ptr));
|
||||
if(sz != GetMemoryBlockSize(ptr))
|
||||
Panic("FAILED!");
|
||||
MemoryFree(ptr);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue