diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-02 08:05:07 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-09-02 08:05:07 +0000 |
commit | 3edf3bec2d407a2e3f5da9f22c9724795811a7df (patch) | |
tree | 5d381c24b941672ebf8b123165aebff6277464f5 /gcc/ada/s-stposu.adb | |
parent | 98b6691ba4c1f1e991b2b80fec89ef194b99ccf6 (diff) | |
download | gcc-3edf3bec2d407a2e3f5da9f22c9724795811a7df.tar.gz |
2011-09-02 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 178437 using svnmerge.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@178439 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-stposu.adb')
-rw-r--r-- | gcc/ada/s-stposu.adb | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/ada/s-stposu.adb b/gcc/ada/s-stposu.adb index 2b4e7fc4044..828c47e6f4e 100644 --- a/gcc/ada/s-stposu.adb +++ b/gcc/ada/s-stposu.adb @@ -269,25 +269,25 @@ package body System.Storage_Pools.Subpools is Addr := N_Addr + Header_And_Padding; - -- Subpool allocations use heterogeneous masters to manage various - -- controlled objects. Associate a Finalize_Address with the object. - -- This relation pair is deleted when the object is deallocated or - -- when the associated master is finalized. + -- Homogeneous masters service the following: - if Is_Subpool_Allocation then - pragma Assert (not Master.Is_Homogeneous); - - Set_Finalize_Address (Addr, Fin_Address); - Finalize_Address_Table_In_Use := True; - - -- Normal allocations chain objects on homogeneous collections - - else - pragma Assert (Master.Is_Homogeneous); + -- 1) Allocations on / Deallocations from regular pools + -- 2) Named access types + -- 3) Most cases of anonymous access types usage + if Master.Is_Homogeneous then if Finalize_Address (Master.all) = null then Set_Finalize_Address (Master.all, Fin_Address); end if; + + -- Heterogeneous masters service the following: + + -- 1) Allocations on / Deallocations from subpools + -- 2) Certain cases of anonymous access types usage + + else + Set_Finalize_Address (Addr, Fin_Address); + Finalize_Address_Table_In_Use := True; end if; -- Non-controlled allocation |