next up previous contents index
Next: Variables. Up: TypesVariables and Constants Previous: Constants

Predefined types

type tmeminfo = record
            available_memory : Longint; 
            available_pages : Longint;
            available_lockable_pages : Longint; 
            linear_space : Longint;
            unlocked_pages : Longint; 
            available_physical_pages : Longint;
            total_physical_pages : Longint; 
            free_linear_space : Longint;
            max_pages_in_paging_file : Longint; 
            reserved : array[0..2] of Longint;
   end;
Holds information about the memory allocation, etc.

Record entry Description
available_memory Largest available free block in bytes.
available_pages Maximum unlocked page allocation in pages
available_lockable_pages Maximum locked page allocation in pages.
linear_space Linear address space size in pages.
unlocked_pages Total number of unlocked pages.
available_physical_pages Total number of free pages.
total_physical_pages Total number of physical pages.
free_linear_space Free linear address space in pages.
max_pages_in_paging_file Size of paging file/partition in pages.

NOTE: The value of a field is -1 (0ffffffffh) if the value is unknown, it's only guaranteed, that available_memory contains a valid value.

The size of the pages can be determined by the get_page_size() function.

type 
trealregs = record
  case Integer of 
    1: { 32-bit } 
      (EDI, ESI, EBP, Res, EBX, EDX, ECX, EAX: Longint; 
       Flags, ES, DS, FS, GS, IP, CS, SP, SS: Word); 
    2: { 16-bit } 
      (DI, DI2, SI, SI2, BP, BP2, R1, R2: Word;
       BX, BX2, DX, DX2, CX, CX2, AX, AX2: Word);
    3: { 8-bit } 
      (stuff: array[1..4] of Longint;
       BL, BH, BL2, BH2, DL, DH, DL2, DH2, CL,
       CH, CL2, CH2, AL, AH, AL2, AH2: Byte);
    4: { Compat } 
      (RealEDI, RealESI, RealEBP, RealRES, RealEBX, 
       RealEDX, RealECX, RealEAX: Longint; 
       RealFlags, RealES, RealDS, RealFS, RealGS, 
       RealIP, RealCS, RealSP, RealSS: Word);
    end;

    registers = trealregs;
These two types contain the data structure to pass register values to a interrupt handler or real mode callback.

type tseginfo = record
             offset : Pointer; segment : Word; end;

This record is used to store a full 48-bit pointer. This may be either a protected mode selector:offset address or in real mode a segment:offset address, depending on application.

See also: Selectors and descriptors, DOS memory access, Interrupt redirection



Michael Van Canneyt
Thu Sep 10 13:59:33 CEST 1998