aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/libgnat/s-secsta.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/libgnat/s-secsta.adb')
-rw-r--r--gcc/ada/libgnat/s-secsta.adb9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ada/libgnat/s-secsta.adb b/gcc/ada/libgnat/s-secsta.adb
index 2749658..9d78b868 100644
--- a/gcc/ada/libgnat/s-secsta.adb
+++ b/gcc/ada/libgnat/s-secsta.adb
@@ -633,6 +633,15 @@ package body System.Secondary_Stack is
if Over_Aligning then
Padding := Alignment;
+
+ -- Typically the padding would be
+ -- Alignment - (Addr mod Alignment)
+ -- however Addr in this case is not known yet. It depends on the
+ -- type of the secondary stack (Dynamic/Static). The allocation
+ -- routine for the respective type of stack requires to know the
+ -- allocation size before the address is known. To ensure a
+ -- sufficient allocation size to fit the padding, the padding is
+ -- calculated conservatively.
end if;
-- Round the requested size (plus the needed padding in case of