Is there a tool to detect the allocated memory for each data structure in a program and how many times that data structure is accessed? [closed]

  architecture, c++, memory-profiling, profiling

I have the source code of a program. I need to know how much memory is allocated for each data structure/variable of the program and the number of accesses to that data structure.

Source: Windows Questions C++