I'm looking for a quick way to figure out how much memory my C++ application is using from within the application itself (Win2000, NT & XP). I've looked at the MSDN help pages, but didn't find any functions that directly seemed to do what i wanted. I'd be content with just heap memory stats, although the more accurate, the better.

On Linux we're using mallinfo or sbrk which do the job pretty well.

Anyone have any ideas? I've heard of using GetProcessMemoryInfo(...), how does that compare speed-wise?