DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦a81de93c6⟧ TextFile

    Length: 4291 (0x10c3)
    Types: TextFile
    Notes: R1k Text-file segment

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦eafe83c50⟧ 
            └─⟦this⟧ 

TextFile


-- Copyright 1986, 1987, 1988, 1989, 1992 Verdix Corporation

-- Interface to library and kernel memory support

with system;
with v_i_types;
package v_i_alloc is

    pragma suppress(ALL_CHECKS);
    pragma suppress(EXCEPTION_TABLES);
    pragma not_elaborated;
    pragma local_access;

------------------------------------------------------------------------------
-- The following routines are called directly by code generated by the VADS
-- compiler.  The aa_global_new routine is called to allocate for the NEW
-- allocator of Ada.  Likewise the aa_aligned new is called when a NEW
-- is done on a record with an alignment clause.  The aa_global_free
-- routine is called from unchecked_deallocation.  The aa_local_new routine
-- is called for the NEW allocators for any access type that is declared local
-- to a subprogram and is given a collection size; aa_local_free is called for
-- unchecked_deallocation of entities declared local to a subprogram.  See
-- VADS User manual for lheap meaning and exact usage.  extend_intr_heap
-- is called when a program needs to allocate more fixed size blocks for the
-- interrupt heap (not available in SLIM_MALLOC).  get_intr_heap_size is
-- called when a program wants to find out how many of the fixed sized blocks
-- remain.
------------------------------------------------------------------------------
	function aa_global_new(size : in v_i_types.alloc_t)
		return system.address;
	function aa_aligned_new(size, dope_size : in v_i_types.alloc_t;
		alignment : in integer) return system.address;
	procedure aa_global_free(a : in system.address);
	function aa_local_new(size : in v_i_types.alloc_t;
		lheap: system.address) return system.address;
	procedure aa_local_free(a: in system.address;
		lheap: system.address);
	procedure extend_intr_heap(extension: in integer);
	function get_intr_heap_size return integer;

------------------------------------------------------------------------------
-- User interface to the kernel's memory allocation services.
--
-- Note: the compiler does NOT generate calls to these routines,
-- but instead calls AA_GLOBAL_NEW and AA_GLOBAL_FREE.  These calls
-- reach the kernel's user-accessible memory allocators, and are typically
-- used as a backstop to get more memory in large chunks. 
--
-- Note: krn_aa_global_new returns system.no_addr if allocation
-- wasn't possible.  It doesn't raise a STORAGE_ERROR exception.
--
-- Provides backward compatibility with earlier releases of VADS.
--
-- The interface to ALL the low kernel services is now provided in
-- ada_krn_i.a.
------------------------------------------------------------------------------

    function krn_aa_global_new(size: v_i_types.alloc_t)
        return system.address;
	  pragma inline_only(krn_aa_global_new);
    procedure krn_aa_global_free(a: system.address);
	  pragma inline_only(krn_aa_global_free);

    -- Extend the size of the current task's stack. Note, this may only
    -- be applicable to the main program's stack. If unable to extend stack,
    -- STORAGE_ERROR exception is raised.
	--
	-- Not supported. Always raises STORAGE_ERROR exception.
    procedure extend_stack;
	  pragma inline_only(extend_stack);

private
	pragma interface(Ada, aa_global_new);
	pragma interface_name(aa_global_new, "AA_GLOBAL_NEW");
	pragma interface(Ada, aa_aligned_new);
	pragma interface_name(aa_aligned_new, "AA_ALIGNED_NEW");
	pragma interface(Ada, aa_global_free);
	pragma interface_name(aa_global_free, "AA_GLOBAL_FREE");
	pragma interface(Ada, aa_local_new);
	pragma interface_name(aa_local_new, "AA_LOCAL_NEW");
	pragma interface(Ada, aa_local_free);
	pragma interface_name(aa_local_free, "AA_LOCAL_FREE");
	pragma interface(Ada, extend_intr_heap);
	pragma interface_name(extend_intr_heap, "__EXTEND_INTR_HEAP");
	pragma interface(Ada, get_intr_heap_size);
	pragma interface_name(get_intr_heap_size, "__GET_INTR_HEAP_SIZE");
end v_i_alloc;

with system;
with v_i_types;
with ada_krn_i;
package body v_i_alloc is
    function krn_aa_global_new(size: v_i_types.alloc_t)
        return system.address
	is
	begin
		return ada_krn_i.alloc(size);
	end;

    procedure krn_aa_global_free(a: system.address) is
	begin
		ada_krn_i.free(a);
	end;

    procedure extend_stack is
	begin
		raise STORAGE_ERROR;
	end;
end v_i_alloc