Memory Allocations and Task Manager

closed account (zb0S216C)
I have a program that allocates memory in excess of 800MB. The allocation succeeds, but according to Task Manager, my program is only allocating ~300KB.

Here are some details:

1) I'm using "::operator new"
2) I'm using Windows 7 with GNUG
3) I'm using a console and not a Win32 application
4) The allocated memory is used by the program

I have a sneaking suspicion that memory allocated with "::operator new" is not registering with Task Manager, but surely Windows would know about the allocated memory and update the Task Manager accordingly?

If it turns out that "::operator new" is not registering with Task Manager, should I use "HeapCreate( )" instead to allocate the memory? If so, will Windows register the allocation with Task Manager?

I've tried Googling this, but nothing is of use to me.

Bonus Question: If a block of memory is allocated and then ignored by the program, but freed by the program at the end, can that memory allocation be optimised away in its entirety?

Thanks :)

Last edited on
Topic archived. No new replies allowed.