Hello forum!
I'm trying to profile the heap of my program, as it seems to be a bit too huge for just the things I'm doing.
Already hunted down a very ugly issue but now I've got multiple questions concerning the following:
My heap-profiler (Visual Studio 2015) claims that an object type called "void" allocated 729.015 bytes.
What is this? Looking at the largest instance with 726.919 bytes, it has this allocation stack:
programname.exe!operator new() - Line 19 C++
programname.exe!std::_Allocate<class sf::Vertex>(unsigned int,class sf::Vertex *,bool)() C++
programname.exe!std::allocator<class sf::Vertex>::allocate(unsigned int)() C++
programname.exe!std::_Wrap_alloc<class std::allocator<class sf::Vertex> >::allocate(unsigned int)() C++
programname.exe!std::vector<class sf::Vertex,class std::allocator<class sf::Vertex> >::_Reallocate(unsigned int)() C++
programname.exe!std::vector<class sf::Vertex,class std::allocator<class sf::Vertex> >::_Reserve(unsigned int)() C++
programname.exe!std::vector<class sf::Vertex,class std::allocator<class sf::Vertex> >::resize(unsigned int)() C++
programname.exe!sf::VertexArray::resize(unsigned int)() C++
programname.exe!Level_Tile::Level_Tile() - Line 22 C++
programname.exe!std::make_unique<Level_Tile,Level_Field &,int,int,char const (&)[16]>() - Line 1630 C++
programname.exe!Level_Field::Level_Field() - Line 18 C++
programname.exe!std::make_unique<Level_Field,Game_Engine &>() - Line 1630 C++
programname.exe!Level_State::Level_State() - Line 23 C++
programname.exe!std::make_unique<Level_State,Game_Engine * &,char const (&)[12]>() - Line 1630 C++
programname.exe!Intro_State::Update() - Line 29 C++
programname.exe!Game_Engine::Update_Game_States() - Line 58 C++
programname.exe!main() - Line 27 C++
programname.exe!invoke_main() - Line 64 C++
programname.exe!__scrt_common_main_seh() - Line 253 C++
programname.exe!__scrt_common_main() - Line 296 C++
programname.exe!mainCRTStartup() - Line 17 C++
kernel32.dll!0x7492338a() C++
ntdll.dll!0x76ee9902() C++tex> >::allocate(unsigned int)() C++
So, are these just a bunch of objects that I allocated? I know what a void is, but having this object type in the heap profiler confuses me.
There are 34 (debug) and 42 (release) of these voids.
What is this? As I want to reduce the RAM used by my application, should I reduce this? What can I do about this?
Another weird thing that appears in my profiler, is the std::_Container_proxy, 816 bytes with 102 instances.
How can I have 102 instances? What does create an instance? These also completely vanish once I build a Release instead of Debug.
My last question, where is the rest of RAM usage?
The application is using 78.864 K in the windows task-manager. But the heap only counts 22.334 kb.
Where is the rest? On the stack?
Here is a screenshot of the profiler even claiming about 98 mb.
Thanks for taking your time reading through my thread! I hope you can help me out.