DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T V

⟦21f7578c7⟧ TextFile

    Length: 7249 (0x1c51)
    Types: TextFile
    Names: »V«

Derivation

└─⟦516dceb10⟧ Bits:30000751 8mm tape, Rational 1000, RCI_VADS
    └─ ⟦9a14c9417⟧ »DATA« 
        └─⟦this⟧ 

TextFile


-- Copyright 1988 Verdix Corporation

------------------------------------------------------------------------------
-- User interface to the memory management operations.  Three distinct
-- memory management methods are supported:
--
--	Fixed pools
--  Flex pools
--  Heap pools
--
-- For each type of pool, the following operations are provided:
--
--	Creation
--  Deletion
--  Allocation
--  Deallocation
--
-- with the exception that deallocation is not provided for heap pools.
------------------------------------------------------------------------------

with System;
use System;
package V_I_Mem is

    pragma Suppress (All_Checks);
    pragma Suppress (Exception_Tables);
    pragma Not_Elaborated;

    --  The following declaration of the type MEM_ERROR_CODE defines the
    --  the possible error conditions which may be returned from the memory
    --  services.
    type Mem_Error_Code is (Mem_Error_Bad_Block, Mem_Error_Bad_Parameter,
                            Mem_Error_Fatal, Mem_Error_Invalid_Overlap_Pool,
                            Mem_Error_Invalid_Pool_Id,
                            Mem_Error_No_Available_Pool,
                            Mem_Error_No_Memory, Mem_Error_Normal);
    for Mem_Error_Code'Size use 8;

    -- Type declaration for a pool id.
    type Pool_Id is new Integer;


    --------------------------------------------------------------------------
    -- Initialize memory services.  This procedure must be called before
    -- any of the memory services.
    --------------------------------------------------------------------------
    procedure Initialize_Services
                 (Top_Of_Memory : in Address := +16#FFFF_FFFF#;
                  Machine_Boundary : in Integer := Integer'Size;
                  Granularity : in Integer := 16);
    --    TOP_OF_MEMORY
    --
    --      TOP_OF_MEMORY specifies the highest memory location addressable
    --      by the target/host.
    --
    --      The default TOP_OF_MEMORY is 16#FFFF_FFFF#.
    --
    --    MACHINE_BOUNDARY
    --
    --      MACHINE_BOUNDARY specifies the CPU's natural boundary
    --      in BITS.  This is an extremely important parameter on machines
    --      that impose specific bit alignment for certain data types.
    --
    --      The default MACHINE_BOUNDARY is integer'size.
    --
    --    GRANULARITY
    --
    --      GRANULARITY controls memory fragmentation within
    --      all the flex memory pools.  These pools provide memory
    --      allocation in variably-sized blocks.  The value is specified
    --      in BYTES and causes all allocation requests to be rounded
    --      up to the nearest multiple of this value.
    --
    --      The default GRANULARITY is 16 bytes.


    --------------------------------------------------------------------------
    -- Fixed Pools
    --------------------------------------------------------------------------

    procedure Create_Fixed_Pool (Base_Address : in Address;
                                 Pool_Size : in Natural;
                                 Block_Size : in Natural;
                                 Pool : out Pool_Id;
                                 Except_Status : out Mem_Error_Code);

    procedure Allocate_Fixed_Block (Pool : in Pool_Id;
                                    Block_Address : out Address;
                                    Except_Status : out Mem_Error_Code);

    procedure Deallocate_Fixed_Block (Block_Address : in Address;
                                      Except_Status : out Mem_Error_Code);

    procedure Fixed_Block_Size (Pool : in Pool_Id;
                                Block_Size : out Natural;
                                Status : out Mem_Error_Code);

    procedure Destroy_Fixed_Pool (Pool : in Pool_Id;
                                  Except_Status : out Mem_Error_Code);


    --------------------------------------------------------------------------
    -- Flex Pools
    --------------------------------------------------------------------------

    procedure Create_Flex_Pool (Base_Address : in Address;
                                Pool_Size : in Integer;
                                Pool : out Pool_Id;
                                Except_Status : out Mem_Error_Code);

    procedure Allocate_Flex_Block (Pool : in Pool_Id;
                                   Block_Size : in Integer;
                                   Block_Address : out Address;
                                   Except_Status : out Mem_Error_Code);

    procedure Deallocate_Flex_Block (Block_Address : in Address;
                                     Except_Status : out Mem_Error_Code);

    procedure Destroy_Flex_Pool (Pool : in Pool_Id;
                                 Except_Status : out Mem_Error_Code);


    --------------------------------------------------------------------------
    -- Heap Pools
    --------------------------------------------------------------------------

    procedure Create_Heap_Pool (Base_Address : in Address;
                                Pool_Size : in Natural;
                                Pool : out Pool_Id;
                                Status : out Mem_Error_Code);

    procedure Allocate_Heap_Block (Pool : in Pool_Id;
                                   Block_Size : in Natural;
                                   Block_Address : out Address;
                                   Status : out Mem_Error_Code);

    procedure Destroy_Heap_Pool (Pool : in Pool_Id;
                                 Except_Status : out Mem_Error_Code);

private
    pragma Interface (Ada, Initialize_Services);
    pragma Interface_Name (Initialize_Services, "__MEM_INITIALIZE_SERVICES");

    pragma Interface (Ada, Create_Fixed_Pool);
    pragma Interface_Name (Create_Fixed_Pool, "__MEM_CREATE_FIXED_POOL");
    pragma Interface (Ada, Allocate_Fixed_Block);
    pragma Interface_Name (Allocate_Fixed_Block, "__MEM_ALLOCATE_FIXED_BLOCK");
    pragma Interface (Ada, Deallocate_Fixed_Block);
    pragma Interface_Name (Deallocate_Fixed_Block,
                           "__MEM_DEALLOCATE_FIXED_BLOCK");
    pragma Interface (Ada, Fixed_Block_Size);
    pragma Interface_Name (Fixed_Block_Size, "__MEM_FIXED_BLOCK_SIZE");
    pragma Interface (Ada, Destroy_Fixed_Pool);
    pragma Interface_Name (Destroy_Fixed_Pool, "__MEM_DESTROY_FIXED_POOL");

    pragma Interface (Ada, Create_Flex_Pool);
    pragma Interface_Name (Create_Flex_Pool, "__MEM_CREATE_FLEX_POOL");
    pragma Interface (Ada, Allocate_Flex_Block);
    pragma Interface_Name (Allocate_Flex_Block, "__MEM_ALLOCATE_FLEX_POOL");
    pragma Interface (Ada, Deallocate_Flex_Block);
    pragma Interface_Name (Deallocate_Flex_Block,
                           "__MEM_DEALLOCATE_FLEX_BLOCK");
    pragma Interface (Ada, Destroy_Flex_Pool);
    pragma Interface_Name (Destroy_Flex_Pool, "__MEM_DESTROY_FLEX_POOL");

    pragma Interface (Ada, Create_Heap_Pool);
    pragma Interface_Name (Create_Heap_Pool, "__MEM_CREATE_HEAP_POOL");
    pragma Interface (Ada, Allocate_Heap_Block);
    pragma Interface_Name (Allocate_Heap_Block, "__MEM_ALLOCATE_HEAP_BLOCK");
    pragma Interface (Ada, Destroy_Heap_Pool);
    pragma Interface_Name (Destroy_Heap_Pool, "__MEM_DESTROY_HEAP_POOL");
end V_I_Mem;