3 with System
.Storage_Elements
; use System
.Storage_Elements
;
4 with Ada
.Unchecked_Deallocation
;
6 procedure Allocator_Maxalign1
is
8 Max_Alignment
: constant := Standard
'Maximum_Alignment;
13 for Block
'Alignment use Standard
'Maximum_Alignment;
15 type Block_Access
is access all Block
;
16 procedure Free
is new Ada
.Unchecked_Deallocation
(Block
, Block_Access
);
18 N_Blocks
: constant := 500;
19 Blocks
: array (1 .. N_Blocks
) of Block_Access
;
21 if Block
'Alignment /= Max_Alignment
then
27 for I
in Blocks
'Range loop
28 Blocks
(I
) := new Block
;
29 if Blocks
(I
).all'Address mod Block
'Alignment /= 0 then
35 for I
in Blocks
'Range loop