Yes, the additional 8MB come from or for DirectX and the DIRECT3DTEXTURE9. In case the video device is lost/ you change the video resolution the 8MB allocated first will be used to create a new DirectX texture for rendering.


I've cut pretty much all big textures from my game (apart from render targets) so the only memory allocations I do dynamically are rather small arrays, maybe a few hundred KB in total. I don't clean them up on level change (but of course I only create them once).
However, I use quite a bunch of global pointers so I have a "free_pointer()" function which I call before any level_load, it just sets them all to NULL again.
If you only have a few (let's say < 20) bigger memory allocations to clean up just do it manually. If you expect to have more than that you could try and write an automated system, like a ~custom memory allocation function~ that registers the allocation somewhere (in an array or list) and then call a cleanup function before level_load.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends