with Unchecked_Deallocation; package Accessed_Buffers is generic type Element is private; type Index is (<>); package One_D_Buffer_Template is type Buffer is array (Index range <>) of Element; type Buffer_Access is access Buffer; procedure Free is new Unchecked_Deallocation (Object => Buffer, Name => Buffer_Access); end One_D_Buffer_Template; generic type Element is private; type Rows is (<>); type Columns is (<>); package Two_D_Buffer_Template is type Buffer is array (Rows range <>, Columns range <>) of Element; type Buffer_Access is access Buffer; procedure Free is new Unchecked_Deallocation (Object => Buffer, Name => Buffer_Access); end Two_D_Buffer_Template; generic type Element is private; type Pages is (<>); type Rows is (<>); type Columns is (<>); package Three_D_Buffer_Template is type Buffer is array (Pages range <>, Rows range <>, Columns range <>) of Element; type Buffer_Access is access Buffer; procedure Free is new Unchecked_Deallocation (Object => Buffer, Name => Buffer_Access); end Three_D_Buffer_Template; generic type Element is private; type Index is (<>); package Packed_One_D_Buffer_Template is type Buffer is array (Index range <>) of Element; type Buffer_Access is access Buffer; pragma PACK (Buffer); procedure Free is new Unchecked_Deallocation (Object => Buffer, Name => Buffer_Access); end Packed_One_D_Buffer_Template; generic type Element is private; type Rows is (<>); type Columns is (<>); package Packed_Two_D_Buffer_Template is type Buffer is array (Rows range <>, Columns range <>) of Element; type Buffer_Access is access Buffer; pragma PACK (Buffer); procedure Free is new Unchecked_Deallocation (Object => Buffer, Name => Buffer_Access); end Packed_Two_D_Buffer_Template; generic type Element is private; type Pages is (<>); type Rows is (<>); type Columns is (<>); package Packed_Three_D_Buffer_Template is type Buffer is array (Pages range <>, Rows range <>, Columns range <>) of Element; type Buffer_Access is access Buffer; pragma PACK (Buffer); procedure Free is new Unchecked_Deallocation (Object => Buffer, Name => Buffer_Access); end Packed_Three_D_Buffer_Template; end Accessed_Buffers;