Can you be more specific about how you're tracking the rising memory usage? I'm doing this, on Windows:
Code: Select all
#include <irrlicht.h>
#include <windows.h>
#include <psapi.h>
using namespace irr;
using namespace core;
using namespace video;
using namespace scene;
using namespace gui;
#pragma comment(lib, "Irrlicht.lib")
#pragma comment(lib, "psapi.lib")
int main()
{
IrrlichtDevice *device;
IVideoDriver* driver;
ISceneManager* smgr;
IGUIEnvironment* guienv;
ICameraSceneNode *cam;
FILE * log = fopen("log.txt", "w");
for(int iteration = 0; iteration < 100; ++iteration)
{
device =
createDevice( video::EDT_DIRECT3D9, dimension2d<s32>(800, 600), 32,
false, false, false, 0);
device->setWindowCaption(L"Hello World! - Irrlicht Engine Demo");
driver = device->getVideoDriver();
smgr = device->getSceneManager();
guienv = device->getGUIEnvironment();
guienv->addStaticText(L"Hello World! This is the Irrlicht Software renderer!",
rect<int>(10,10,260,22), true);
cam = smgr->addCameraSceneNode(0, vector3df(50, 50, 50), vector3df(0, 0, 0));
while(device->run())
{
driver->beginScene(true, true, SColor(255,140,100,101));
driver->endScene();
device->closeDevice();
}
smgr->getRootSceneNode()->removeAll();
driver->removeAllTextures();
guienv->clear();
device->drop();
PROCESS_MEMORY_COUNTERS counters;
(void)GetProcessMemoryInfo(GetCurrentProcess(), &counters, sizeof(counters));
fprintf(log, "WSS %d \tPWSS %d\tPFU %d\tPPFU %d\n",
counters.WorkingSetSize,
counters.PeakWorkingSetSize,
counters.PagefileUsage,
counters.PeakPagefileUsage
);
}
(void)fclose(log);
return 0;
}
With these results:
Code: Select all
WSS 8855552 PWSS 9273344 PFU 5910528 PPFU 6627328
WSS 8896512 PWSS 9367552 PFU 5939200 PPFU 6627328
WSS 8863744 PWSS 9367552 PFU 5906432 PPFU 6627328
WSS 8876032 PWSS 9371648 PFU 5918720 PPFU 6627328
WSS 8871936 PWSS 9371648 PFU 5914624 PPFU 6627328
WSS 8888320 PWSS 9388032 PFU 5931008 PPFU 6627328
WSS 8884224 PWSS 9388032 PFU 5926912 PPFU 6627328
WSS 8884224 PWSS 9388032 PFU 5926912 PPFU 6627328
WSS 8888320 PWSS 9388032 PFU 5931008 PPFU 6627328
WSS 8888320 PWSS 9388032 PFU 5931008 PPFU 6627328
WSS 8880128 PWSS 9388032 PFU 5922816 PPFU 6627328
WSS 8904704 PWSS 9388032 PFU 5947392 PPFU 6627328
WSS 8884224 PWSS 9388032 PFU 5926912 PPFU 6627328
WSS 8904704 PWSS 9388032 PFU 5947392 PPFU 6627328
WSS 8904704 PWSS 9388032 PFU 5947392 PPFU 6627328
WSS 8904704 PWSS 9388032 PFU 5947392 PPFU 6627328
WSS 8884224 PWSS 9388032 PFU 5926912 PPFU 6627328
WSS 8896512 PWSS 9388032 PFU 5939200 PPFU 6627328
WSS 8884224 PWSS 9388032 PFU 5926912 PPFU 6627328
WSS 8896512 PWSS 9388032 PFU 5939200 PPFU 6627328
WSS 8904704 PWSS 9388032 PFU 5947392 PPFU 6627328
WSS 8904704 PWSS 9388032 PFU 5947392 PPFU 6627328
WSS 8884224 PWSS 9388032 PFU 5926912 PPFU 6627328
WSS 8888320 PWSS 9388032 PFU 5931008 PPFU 6627328
WSS 8884224 PWSS 9388032 PFU 5926912 PPFU 6627328
WSS 8896512 PWSS 9388032 PFU 5939200 PPFU 6627328
WSS 8876032 PWSS 9388032 PFU 5918720 PPFU 6627328
WSS 8908800 PWSS 9388032 PFU 5951488 PPFU 6627328
WSS 8908800 PWSS 9388032 PFU 5951488 PPFU 6627328
WSS 8876032 PWSS 9388032 PFU 5918720 PPFU 6627328
WSS 8908800 PWSS 9388032 PFU 5951488 PPFU 6627328
WSS 8908800 PWSS 9388032 PFU 5951488 PPFU 6627328
WSS 8908800 PWSS 9388032 PFU 5951488 PPFU 6627328
WSS 8908800 PWSS 9388032 PFU 5951488 PPFU 6627328
WSS 8908800 PWSS 9388032 PFU 5951488 PPFU 6627328
WSS 8908800 PWSS 9388032 PFU 5951488 PPFU 6627328
WSS 8908800 PWSS 9388032 PFU 5951488 PPFU 6627328
WSS 8908800 PWSS 9388032 PFU 5951488 PPFU 6627328
WSS 8884224 PWSS 9388032 PFU 5926912 PPFU 6627328
WSS 8904704 PWSS 9388032 PFU 5947392 PPFU 6627328
WSS 9101312 PWSS 9392128 PFU 6144000 PPFU 6627328
WSS 9232384 PWSS 9392128 PFU 6275072 PPFU 6627328
WSS 9162752 PWSS 9392128 PFU 6205440 PPFU 6627328
WSS 9166848 PWSS 9392128 PFU 6209536 PPFU 6627328
WSS 9175040 PWSS 9392128 PFU 6217728 PPFU 6627328
WSS 9179136 PWSS 9392128 PFU 6221824 PPFU 6627328
WSS 9154560 PWSS 9392128 PFU 6197248 PPFU 6627328
WSS 9162752 PWSS 9392128 PFU 6205440 PPFU 6627328
WSS 9166848 PWSS 9392128 PFU 6209536 PPFU 6627328
WSS 9150464 PWSS 9392128 PFU 6193152 PPFU 6627328
WSS 9179136 PWSS 9392128 PFU 6221824 PPFU 6627328
WSS 9179136 PWSS 9392128 PFU 6221824 PPFU 6627328
WSS 9158656 PWSS 9392128 PFU 6201344 PPFU 6627328
WSS 9158656 PWSS 9392128 PFU 6201344 PPFU 6627328
WSS 9179136 PWSS 9392128 PFU 6221824 PPFU 6627328
WSS 9179136 PWSS 9392128 PFU 6221824 PPFU 6627328
WSS 9179136 PWSS 9392128 PFU 6221824 PPFU 6627328
WSS 9179136 PWSS 9392128 PFU 6221824 PPFU 6627328
WSS 9179136 PWSS 9392128 PFU 6221824 PPFU 6627328
WSS 9179136 PWSS 9392128 PFU 6221824 PPFU 6627328
WSS 9170944 PWSS 9392128 PFU 6213632 PPFU 6627328
WSS 9166848 PWSS 9392128 PFU 6209536 PPFU 6627328
WSS 9220096 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9170944 PWSS 9392128 PFU 6213632 PPFU 6627328
WSS 9220096 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9220096 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9175040 PWSS 9392128 PFU 6213632 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9175040 PWSS 9392128 PFU 6213632 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9175040 PWSS 9392128 PFU 6213632 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9175040 PWSS 9392128 PFU 6213632 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9175040 PWSS 9392128 PFU 6213632 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9175040 PWSS 9392128 PFU 6213632 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9175040 PWSS 9392128 PFU 6213632 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9175040 PWSS 9392128 PFU 6213632 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9175040 PWSS 9392128 PFU 6213632 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9175040 PWSS 9392128 PFU 6213632 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9175040 PWSS 9392128 PFU 6213632 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9224192 PWSS 9392128 PFU 6262784 PPFU 6627328
WSS 9175040 PWSS 9392128 PFU 6213632 PPFU 6627328
There does
appear to be an upwards trend, but I'd prefer to use something like fortify, purify or valgrind to capture and track actual allocations rather than relying on the OS to report it accurately.