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

⟦b9cc221df⟧ TextFile

    Length: 5578 (0x15ca)
    Types: TextFile
    Names: »V«

Derivation

└─⟦afbc8121e⟧ Bits:30000532 8mm tape, Rational 1000, MC68020_OS2000 7_2_2
    └─ ⟦77aa8350c⟧ »DATA« 
        └─⟦f794ecd1d⟧ 
            └─⟦24d1ddd49⟧ 
                └─⟦this⟧ 

TextFile

--    The use of this system is subject to the software license terms and
--    conditions agreed upon between Rational and the Customer.
--
--                Copyright 1988 by Rational.
--
--                          RESTRICTED RIGHTS LEGEND
--
--    Use, duplication, or disclosure by the Government is subject to
--    restrictions as set forth in subdivision (b)(3)(ii) of the Rights in
--    Technical Data and Computer Software clause at 52.227-7013.
--
--
--                Rational
--                3320 Scott Boulevard
--                Santa Clara, California 95054-3197
--
--   PROPRIETARY AND CONFIDENTIAL INFORMATION OF RATIONAL;
--   USE OR COPYING WITHOUT EXPRESS WRITTEN AUTHORIZATION
--   IS STRICTLY PROHIBITED.  THIS MATERIAL IS PROTECTED AS
--   AN UNPUBLISHED WORK UNDER THE U.S. COPYRIGHT ACT OF
--   1976.  CREATED 1988.  ALL RIGHTS RESERVED.
--
--

with Runtime_Ids;
with System_Definitions;

package Storage_Management is

    --************************************************************************
    --*
    --* ABSTRACT:
    --* Storage management for an access collection.  Allocate, deallocate,
    --* and extend storage as the user requests.
    --* The user should give the correct sizes at all times except
    --* when deallocating an entire access collection.
    --*
    --************************************************************************

    subtype System_Address is System_Definitions.Address;

    subtype Address_Ref is System_Definitions.Address_Ref;
    -- Collection creation flags

    Use_Default_Chunk_Size      : constant := -1;
    Use_Descriptor_Or_Null_Size : constant := 0;


    -- a skin for Create_Collection for the unsophisticated.
    function Allocate_Collection (Units  : Integer;  
                                  Extend : Boolean) return System_Address;
    -- allocate an access collection of at least, size "units" and
    -- return its address;
    -- Extend indicates whether we want automatic collection extension
    -- if collection subsequently becomes exhausted

    type Collection_Attributes is range 0 .. 2 ** 7 - 1;

    -- Collection attributes currently supported:
    No_Coalesce_And_No_Extend : constant Collection_Attributes := 0;
    Extend_And_No_Coalesce    : constant Collection_Attributes := 1;
    Coalesce_And_No_Extend    : constant Collection_Attributes := 2;
    Coalesce_And_Extend       : constant Collection_Attributes := 3;
    Max_Collection_Attributes : constant Collection_Attributes := 3;

    function Create_Collection
                (Units          : Integer;  
                 Attributes     : Collection_Attributes := Coalesce_And_Extend;
                 Extension_Size : Integer := 0) return System_Address;
    -- allocate an access collection of at least, size "units" and
    -- return its address.
    --    No_Coalesce indicates the free list should not be coalesced when
    --    objects are deallocated.  Useful if all objects are same size.  Will
    --    result in lost storage if they are not.
    --    Extend indicates whether we want automatic collection extension
    --    if collection subsequently becomes exhausted.
    -- Extension_Size indicates the size of the extension if the collection
    -- is extensible. 0 means use the default extension size.

    function Allocate_Fixed_Cell
                (Units      : Integer;  
                 Collection : System_Address) return System_Address;
    -- allocate space for an item of exact size "units" in the access
    -- collection at "collection", returning the object's address.
    -- Note that the size of the item is not saved, so the storage manager
    -- has no subsequent idea of size

    function Collection_Size (Cp : System_Address) return Integer;
    -- Implements the 'STORAGE_SIZE attribute for an access type.
    -- Takes as param the collection pointer, and returns the number
    -- of storage units currently in the collection

    procedure Deallocate_Collection (Addr : in out Address_Ref);
    -- deallocate an entire access collection list starting at Addr.all
    -- (size is known to storage manager)
    -- postcondition: Addr.all = null

    procedure Deallocate_Fixed_Cell (Units      : Integer;
                                     Collection : System_Address;
                                     Cell       : Address_Ref);
    -- deallocate space of exact size Units in access collection list
    -- Collection for the item at address Cell.all;
    -- postcondition: Cell.all = null

private

    pragma Export_Function (Allocate_Collection, "__ALLOCATE_COLLECTION");
    pragma Suppress (Elaboration_Check, Allocate_Collection);

    pragma Export_Function (Create_Collection, "__CREATE_COLLECTION");
    pragma Suppress (Elaboration_Check, Create_Collection);

    pragma Export_Function (Allocate_Fixed_Cell, "__ALLOCATE_FIXED_CELL");
    pragma Suppress (Elaboration_Check, Allocate_Fixed_Cell);

    pragma Export_Function (Collection_Size, "__COLLECTION_SIZE");
    pragma Suppress (Elaboration_Check, Collection_Size);

    pragma Export_Procedure (Deallocate_Collection, "__DEALLOCATE_COLLECTION");
    pragma Suppress (Elaboration_Check, Deallocate_Collection);

    pragma Export_Procedure (Deallocate_Fixed_Cell, "__DEALLOCATE_FIXED_CELL");
    pragma Suppress (Elaboration_Check, Deallocate_Fixed_Cell);

end Storage_Management;
pragma Export_Elaboration_Procedure ("__STORAGE_MGMT_SPEC_ELAB");
pragma Runtime_Unit (Unit_Number         => Runtime_Ids.Runtime_Compunit,
                     Elab_Routine_Number => Runtime_Ids.Internal);