News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

VirtualAlloc

Started by Magnum, May 10, 2013, 07:09:29 AM

Previous topic - Next topic

Magnum

When a breakpoint is set after this, Windows Task Manager doesn't show any change in available physical memory.

Shouldn't it ?


invoke VirtualAlloc, NULL, 1024000, MEM_COMMIT, PAGE_READWRITE

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

qWord

Quote from: msdn
MEM_COMMIT

Allocates memory charges (from the overall size of memory and the paging files on disk) for the specified reserved memory pages. The function also guarantees that when the caller later initially accesses the memory, the contents will be zero. Actual physical pages are not allocated unless/until the virtual addresses are actually accessed. [...]
MREAL macros - when you need floating point arithmetic while assembling!

Magnum

Thanks.

Both the Programmers Reference(OLD) and the 2003 Platform SDK don't have that info.

Andy
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

Adamanteus

  That's looks that page allocated when to Windows it's need - but, if it's need from start of program - it's already allocated from global heap seen by Task manager. I ever count this function allocates memory in special pool - and need to use when, small allocations (program critical) need be guaranteed (from this pool), so possible not check NULL-returned values, hoping on Windows memory manager.