--------------------------------
-- Ivan Levashew aka OCTAGRAM --
--              Barnaul, 2009 --
--------------------------------

with System; use System;
with System.Storage_Pools; use System.Storage_Pools;

package Turbo_Private.Memory.Fallback is
   pragma Preelaborate;

   type Fallback_Storage_Pool is new
      Turbo_Storage_Pool with null record;

   procedure Allocate (
      Pool : in out Fallback_Storage_Pool;
      Storage_Address : out Address;
      Size_In_Storage_Elements : in Storage_Elements.Storage_Count;
      Alignment : in Storage_Elements.Storage_Count);

   procedure Deallocate (
      Pool : in out Fallback_Storage_Pool;
      Storage_Address : in Address;
      Size_In_Storage_Elements : in Storage_Elements.Storage_Count;
      Alignment : in Storage_Elements.Storage_Count);

   function Storage_Size (Pool : Fallback_Storage_Pool)
        return Storage_Elements.Storage_Count;

   procedure Reallocate (
      Pool : in out Fallback_Storage_Pool;
      Storage_Address : in out Address;
      Size_In_Storage_Elements, New_Size_In_Storage_Elements : in Storage_Elements.Storage_Count;
      Alignment : in Storage_Elements.Storage_Count);

   procedure Deallocate (
      Pool : in out Fallback_Storage_Pool;
      Storage_Address : in Address);

   procedure Reallocate (
      Pool : in out Fallback_Storage_Pool;
      Storage_Address : in out Address;
      New_Size_In_Storage_Elements : in Storage_Elements.Storage_Count);

   Storage_Pool : Fallback_Storage_Pool;

end Turbo_Private.Memory.Fallback;
