
-- 1: --------------------------------
-- 2: -- Ivan Levashew aka OCTAGRAM --
-- 3: --              Barnaul, 2009 --
-- 4: --------------------------------

-- 5:

-- 6: with System; use System;

-- 7: with System.Storage_Pools; use System.Storage_Pools;
with system;

-- 8:

-- 9: package Turbo_Private.Memory.Fallback is
with turbo_private.turbo_private__memory;
with system;
with system;
use system;
with system.system__storage_pools;
use system.system__storage_pools;
with ada.ada__tags;
with system;
with system.system__finalization_root;
with system.system__finalization_implementation;
with system.system__storage_elements;
with system.system__soft_links;
with system.system__standard_library;
turbo_private__memory__fallback_E : boolean := false;
package turbo_private.turbo_private__memory.
  turbo_private__memory__fallback is

-- 10:    pragma Preelaborate;
   pragma preelaborate;

-- 11:

-- 12:    type Fallback_Storage_Pool is new
   type turbo_private__memory__fallback__fallback_storage_pool is new
     turbo_private__memory__turbo_storage_pool with record
      _parent : turbo_private__memory__turbo_storage_pool;
   end record;

-- 13:       Turbo_Storage_Pool with null record;

-- 14:

-- 15:    procedure Allocate (
   procedure turbo_private__memory__fallback__allocate (pool : in out
     turbo_private__memory__fallback__fallback_storage_pool;
     storage_address : out system__address; size_in_storage_elements :
     in system__storage_elements.
     system__storage_elements__storage_count; alignment : in
     system__storage_elements.system__storage_elements__storage_count);

-- 16:       Pool : in out Fallback_Storage_Pool;

-- 17:       Storage_Address : out Address;

-- 18:       Size_In_Storage_Elements : in Storage_Elements.Storage_Count;

-- 19:       Alignment : in Storage_Elements.Storage_Count);

-- 20:

-- 21:    procedure Deallocate (
   procedure turbo_private__memory__fallback__deallocate (pool : in
     out turbo_private__memory__fallback__fallback_storage_pool;
     storage_address : in system__address; size_in_storage_elements :
     in system__storage_elements.
     system__storage_elements__storage_count; alignment : in
     system__storage_elements.system__storage_elements__storage_count);

-- 22:       Pool : in out Fallback_Storage_Pool;

-- 23:       Storage_Address : in Address;

-- 24:       Size_In_Storage_Elements : in Storage_Elements.Storage_Count;

-- 25:       Alignment : in Storage_Elements.Storage_Count);

-- 26:

-- 27:    function Storage_Size (Pool : Fallback_Storage_Pool)
   function turbo_private__memory__fallback__storage_size (pool :
     turbo_private__memory__fallback__fallback_storage_pool) return
     system__storage_elements.system__storage_elements__storage_count;

-- 28:         return Storage_Elements.Storage_Count;

-- 29:

-- 30:    procedure Reallocate (
   procedure turbo_private__memory__fallback__reallocate (pool : in
     out turbo_private__memory__fallback__fallback_storage_pool;
     storage_address : in out system__address; size_in_storage_elements :
     in system__storage_elements.
     system__storage_elements__storage_count;
     new_size_in_storage_elements : in system__storage_elements.
     system__storage_elements__storage_count; alignment : in
     system__storage_elements.system__storage_elements__storage_count);

-- 31:       Pool : in out Fallback_Storage_Pool;

-- 32:       Storage_Address : in out Address;

-- 33:       Size_In_Storage_Elements, New_Size_In_Storage_Elements : in Storage_Elements.Storage_Count;

-- 34:       Alignment : in Storage_Elements.Storage_Count);

-- 35:

-- 36:    procedure Deallocate (
   procedure turbo_private__memory__fallback__deallocate__2 (pool : in
     out turbo_private__memory__fallback__fallback_storage_pool;
     storage_address : in system__address);

-- 37:       Pool : in out Fallback_Storage_Pool;

-- 38:       Storage_Address : in Address);

-- 39:

-- 40:    procedure Reallocate (
   procedure turbo_private__memory__fallback__reallocate__2 (pool : in
     out turbo_private__memory__fallback__fallback_storage_pool;
     storage_address : in out system__address;
     new_size_in_storage_elements : in system__storage_elements.
     system__storage_elements__storage_count);
   function turbo_private__memory__fallback___size (x :
     turbo_private__memory__fallback__fallback_storage_pool) return
     long_long_integer;
   function turbo_private__memory__fallback___alignment (x :
     turbo_private__memory__fallback__fallback_storage_pool) return
     integer;
   procedure turbo_private__memory__fallback__fallback_storage_poolDF (
     v : in out turbo_private__memory__fallback__fallback_storage_pool;
     b : boolean);

-- 41:       Pool : in out Fallback_Storage_Pool;

-- 42:       Storage_Address : in out Address;

-- 43:       New_Size_In_Storage_Elements : in Storage_Elements.Storage_Count);

-- 44:

-- 45:    Storage_Pool : Fallback_Storage_Pool;
   freeze turbo_private__memory__fallback__fallback_storage_pool [
      subtype turbo_private__memory__fallback__Tfallback_storage_poolTS is
        ada__tags__dispatch_table_wrapper (9);
      turbo_private__memory__fallback__fallback_storage_poolT :
        aliased constant ada__tags__dispatch_table_wrapper (9);
      $pragma import (ada,
        turbo_private__memory__fallback__fallback_storage_poolT, "turbo_private__memory__fallback__fallback_storage_poolT");
      subtype turbo_private__memory__fallback__S2s is
        ada__tags__address_array (1 ..
        turbo_private__memory__fallback__fallback_storage_poolT.
        num_prims);
      null;
      turbo_private__memory__fallback__fallback_storage_poolP : static
        constant ada__tags__tag := ada__tags__tag!(
        turbo_private__memory__fallback__fallback_storage_poolT.
        prims_ptr'address);
      turbo_private__memory__fallback__fallback_storage_poolY :
        constant system__address :=
        turbo_private__memory__fallback__fallback_storage_poolT.
        predef_prims'address;
      type turbo_private__memory__fallback__fallback_storage_poolG is
        array (1 .. 9) of ada__tags__prim_ptr;
      type turbo_private__memory__fallback__fallback_storage_poolH is
        access turbo_private__memory__fallback__fallback_storage_poolG;
      freeze turbo_private__memory__fallback___size []
      freeze turbo_private__memory__fallback___alignment []
      freeze turbo_private__memory__fallback__fallback_storage_poolDF []
      procedure
        turbo_private__memory__fallback__fallback_storage_poolIP (_init :
        in out turbo_private__memory__fallback__fallback_storage_pool;
        P5s : boolean := true) is
      begin
         if P5s then
            _init._tag :=
              turbo_private__memory__fallback__fallback_storage_poolP;
         end if;
         turbo_private__memory__turbo_storage_poolIP (_init._parent,
           false);
         return;
      end turbo_private__memory__fallback__fallback_storage_poolIP;
      function turbo_private__memory__fallback___alignment (x :
        turbo_private__memory__fallback__fallback_storage_pool) return
        integer is
      begin
         return x'alignment;
      end turbo_private__memory__fallback___alignment;
      function turbo_private__memory__fallback___size (x :
        turbo_private__memory__fallback__fallback_storage_pool) return
        long_long_integer is
      begin
         return x'size;
      end turbo_private__memory__fallback___size;
      procedure
        turbo_private__memory__fallback__fallback_storage_poolDF (v :
        in out turbo_private__memory__fallback__fallback_storage_pool;
        b : boolean) is
      begin
         if b then
            $system__finalization_implementation__finalize_one (
              system__finalization_root__finalizable?(v));
         else
            $ada__finalization__finalize__2 (v);
         end if;
         return;
      end turbo_private__memory__fallback__fallback_storage_poolDF;
   ]
   freeze turbo_private__memory__fallback__Tfallback_storage_poolC []
   freeze turbo_private__memory__fallback__allocate []
   freeze turbo_private__memory__fallback__deallocate []
   freeze turbo_private__memory__fallback__storage_size []
   freeze turbo_private__memory__fallback__reallocate []
   freeze turbo_private__memory__fallback__deallocate__2 []
   freeze turbo_private__memory__fallback__reallocate__2 []
   subtype turbo_private__memory__fallback__Tfallback_storage_poolE9sS is
     string (1 .. 52);
   turbo_private__memory__fallback__fallback_storage_poolE9s : static
     constant string (1 .. 52) :=
     "TURBO_PRIVATE.MEMORY.FALLBACK.FALLBACK_STORAGE_POOL["00"]";
   turbo_private__memory__fallback__fallback_storage_poolH10s :
     ada__tags__tag := ada__tags__tag!(ada__tags__tag'(null));
   subtype turbo_private__memory__fallback__Tfallback_storage_poolB13sS is
     ada__tags__type_specific_data (6);
   [subtype turbo_private__memory__fallback__T22s is
     ada__tags__tag_table (0 .. 6)]
   reference turbo_private__memory__fallback__T22s
   turbo_private__memory__fallback__fallback_storage_poolB13s : static
     aliased constant ada__tags__type_specific_data (6) := (
      idepth => 6,
      access_level => 0,
      expanded_name => ada__tags__cstring_ptr!(
        turbo_private__memory__fallback__fallback_storage_poolE9s'
        address),
      external_tag => ada__tags__cstring_ptr!(
        turbo_private__memory__fallback__fallback_storage_poolE9s'
        address),
      ht_link => ada__tags__tag_ptr!(
        turbo_private__memory__fallback__fallback_storage_poolH10s'
        address),
      transportable => false,
      rc_offset => 0,
      size_func => ada__tags__size_ptr!(
        turbo_private__memory__fallback___size'unrestricted_access),
      interfaces_table => null,
      ssd => null,
      tags_table => (
        turbo_private__memory__fallback__fallback_storage_poolP,
        turbo_private__memory__turbo_storage_poolP,
        turbo_private__memory__reallocable_storage_poolP,
        system__storage_pools__root_storage_poolP,
        ada__finalization__limited_controlledP,
        system__finalization_root__root_controlledP,
        system__finalization_root__empty_root_controlledP));
   for turbo_private__memory__fallback__fallback_storage_poolB13s'
     alignment use 4;
   subtype turbo_private__memory__fallback__S14s is
     ada__tags__address_array;
   turbo_private__memory__fallback__fallback_storage_poolR11s : static
   [subtype turbo_private__memory__fallback__T31s is
     ada__tags__address_array (1 .. 10)]
     aliased constant turbo_private__memory__fallback__T31s := (
     turbo_private__memory__fallback___size'unrestricted_access,
     turbo_private__memory__fallback___alignment'unrestricted_access,
     ada__finalization__limited_controlledSR__2'unrestricted_access,
     ada__finalization__limited_controlledSW__2'unrestricted_access,
     null, ada__finalization__limited_controlledSO__2'
     unrestricted_access, null, system__finalization_root___assign__2'
     unrestricted_access, null,
     turbo_private__memory__fallback__fallback_storage_poolDF'
     unrestricted_access);
   for turbo_private__memory__fallback__fallback_storage_poolR11s'
     alignment use 4;
   subtype turbo_private__memory__fallback__Tfallback_storage_poolT8sS is
     ada__tags__dispatch_table_wrapper (9);
   [subtype turbo_private__memory__fallback__T45s is
     ada__tags__address_array (1 .. 9)]
   reference turbo_private__memory__fallback__T45s
   turbo_private__memory__fallback__fallback_storage_poolT : static
     aliased constant ada__tags__dispatch_table_wrapper (9) := (
      num_prims => 9,
      signature => ada__tags__primary_dt,
      tag_kind => ada__tags__tk_limited_tagged,
      predef_prims =>
        turbo_private__memory__fallback__fallback_storage_poolR11s'
        address,
      offset_to_top => 0,
      tsd => turbo_private__memory__fallback__fallback_storage_poolB13s'
        address,
      prims_ptr => (ada__finalization__initialize__2'
        unrestricted_access, ada__finalization__finalize__2'
        unrestricted_access, system__finalization_root__adjust'
        unrestricted_access, turbo_private__memory__fallback__allocate'
        unrestricted_access,
        turbo_private__memory__fallback__deallocate'unrestricted_access,
        turbo_private__memory__fallback__storage_size'
        unrestricted_access,
        turbo_private__memory__fallback__reallocate'unrestricted_access,
        turbo_private__memory__fallback__deallocate__2'
        unrestricted_access,
        turbo_private__memory__fallback__reallocate__2'
        unrestricted_access));
   $pragma export (ada,
     turbo_private__memory__fallback__fallback_storage_poolT, "turbo_private__memory__fallback__fallback_storage_poolT");
   for turbo_private__memory__fallback__fallback_storage_poolT'
     alignment use 4;
   $ada__tags__register_tag (
     turbo_private__memory__fallback__fallback_storage_poolP);
   turbo_private__memory__fallback__storage_pool :
     turbo_private__memory__fallback__fallback_storage_pool;
   turbo_private__memory__fallback__fallback_storage_poolIP (
     turbo_private__memory__fallback__storage_pool, P5s => true);
   turbo_private__memory__fallback__B46s : begin
      system__soft_links__abort_defer.all;
      $ada__finalization__initialize__2 (
        turbo_private__memory__fallback__storage_pool);
      $system__finalization_implementation__attach_to_final_list (
        system__finalization_implementation__global_final_list,
        system__finalization_root__finalizable?(
        turbo_private__memory__fallback__storage_pool), 1);
   at end
      system__standard_library__abort_undefer_direct;

-- 46:

-- 47: end Turbo_Private.Memory.Fallback;
   end turbo_private__memory__fallback__B46s;
   [type turbo_private__memory__fallback__Tfallback_storage_poolGB is array (
     1 .. 9 range <>) of ada__tags__prim_ptr]
   freeze turbo_private__memory__fallback__Tfallback_storage_poolGB []
   freeze turbo_private__memory__fallback__fallback_storage_poolG []
   freeze turbo_private__memory__fallback__fallback_storage_poolH []
end turbo_private.turbo_private__memory.turbo_private__memory__fallback;
