|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 7393 (0x1ce1)
Types: TextFile
Notes: R1k Text-file segment
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦904abe96e⟧
└─⟦this⟧
-- 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