News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

unknown memory

Started by Rockphorr, February 19, 2008, 12:02:12 PM

Previous topic - Next topic

Rockphorr

Hi
I called dos fn allocate memory with zero size of it.
I got some segment address.
What memory is it ?


Strike while the iron is hot - Бей утюгом, пока он горячий

MichaelW

I tested this only under Windows 2000. The allocation appears to be from the same area of memory as the non-zero allocations. For an allocation of zero the OS allocates a valid memory control block, but no memory.

Allocating 16-byte block
seg address of block = 04BEh
mcb signature = 'M'
PSP seg of owner = 0557h
block size = 0001h

Allocating 0-byte block
seg address of block = 04C0h
mcb signature = 'M'
PSP seg of owner = 0557h
block size = 0000h

Allocating 0-byte block
seg address of block = 04C1h
mcb signature = 'M'
PSP seg of owner = 0557h
block size = 0000h

Allocating 16-byte block
seg address of block = 04C2h
mcb signature = 'M'
PSP seg of owner = 0557h
block size = 0001h



[attachment deleted by admin]
eschew obfuscation