The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: Rockphorr on February 19, 2008, 12:02:12 PM

Title: unknown memory
Post by: Rockphorr on February 19, 2008, 12:02:12 PM
Hi
I called dos fn allocate memory with zero size of it.
I got some segment address.
What memory is it ?


Title: Re: unknown memory
Post by: MichaelW on February 19, 2008, 08:29:01 PM
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]