ARENA

ARENA STRUC

arenaSignature db ? ;4dh = valid, 5ah = last

arenaOwner dw ? ;owner of arena item

arenaSize dw ? ;size of item, in paragraphs

arenaReserved db 3 dup(?) ;reserved

arenaName db 8 dup(?) ;owner filename

ARENA ENDS

The ARENA structure contains information about a block of memory. MS-DOS uses a linked list of these structures to keep track of and manage system memory.

Fields

arenaSignature

Specifies whether the structure is valid. This field must contain either 4Dh or 5Ah. The value 5Ah indicates that the structure is the last in the linked list.

arenaOwner

Specifies the owner of the block. This field contains the segment address of the program segment prefix (PSP) for the owning program. It contains zero if the block is not owned.

arenaSize

Specifies the size of the block, in paragraphs. The block starts immediately after the ARENA structure.

arenaReserved

Reserved; do not use.

arenaName

Contains a zero-terminated string specifying the filename of the program that owns the memory. If the filename has fewer than eight characters, the remaining characters in this field are not used. Names such as SC and SD are used by MS-DOS to represent system code (programs) and system data, respectively.

Comments

Each ARENA structure is followed immediately by a contiguous block of memory. The next ARENA structure in the linked list follows the contiguous block. This means the segment address of the next structure in the list is equal to the segment address of the current memory block plus its size.

MS-DOS fills the arenaName field for a block of memory when it loads a program into the block. The ARENA structures for memory allocated by programs using Allocate Memory (Interrupt 21h Function 48h) are not filled in this way.

See Also

Interrupt 21h Function 48h Allocate Memory