From a memory leak log I have the following info:
TestApp.exe! + 2238ch
Let us say this means that method at offset ‘2238c’ (hex value) is leaking.
How can I locate the corresponding method in my source code? I have the linker map (testapp.map) but not sure how to use it.
This is a C++ application compiled in VS2008.
Your map file will have a bunch of entries like these:
This shows you exactly how your code is laid out in memory. e.g. main() starts at E0 and ends at 30F in segment 1.
You just need to go through the address list to see where the address you were given lands. One thing to look out for is there are usually multiple segments, but you can usually deduce which one has the code you’re interested in.