O
Office Drone
I'm a bit confused about memory usage, and for some reason I wasn't
able to find a single point-of-call to get the amount of memory
available.
If we take, for instance, the Windows platform:
There is
* Virtual memory you can allocate (VirtualAlloc)
* Global memory you can allocate (GlobalAlloc)
* Local memory you can allocate (LocalAlloc)
* Heap memory you can allocate (HeapAlloc)
* Dynamic memory allocated via malloc/calloc
* Memory allocated via new (which I presume is the same malloc)
Why are there so many different types of memory, and what is the best
way to return the amount of memory available to allocs/new?
What I need is to check on memory leaks in my program, since I'm
writing my own memory manager.
Also if there's an ANSI C function to return it cross-platform, it'll
be great if anyone could hint on its name.
Any info from the monsters of C++ will be appreciated.
able to find a single point-of-call to get the amount of memory
available.
If we take, for instance, the Windows platform:
There is
* Virtual memory you can allocate (VirtualAlloc)
* Global memory you can allocate (GlobalAlloc)
* Local memory you can allocate (LocalAlloc)
* Heap memory you can allocate (HeapAlloc)
* Dynamic memory allocated via malloc/calloc
* Memory allocated via new (which I presume is the same malloc)
Why are there so many different types of memory, and what is the best
way to return the amount of memory available to allocs/new?
What I need is to check on memory leaks in my program, since I'm
writing my own memory manager.
Also if there's an ANSI C function to return it cross-platform, it'll
be great if anyone could hint on its name.
Any info from the monsters of C++ will be appreciated.