d: Merge upstream dmd 60bfa0ee7, druntime 94bd5bcb, phobos 3a1cd9a01.
[official-gcc.git] / libphobos / libdruntime / rt / memory.d
blob99b00c0c5516d34c8031927bb10923092697d6c7
1 /**
2 * This module tells the garbage collector about the static data and bss segments,
3 * so the GC can scan them for roots. It does not deal with thread local static data.
5 * Copyright: Copyright Digital Mars 2000 - 2012.
6 * License: Distributed under the
7 * $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0).
8 * (See accompanying file LICENSE)
9 * Authors: Walter Bright, Sean Kelly
10 * Source: $(DRUNTIMESRC rt/_memory.d)
13 module rt.memory;
16 import core.memory;
17 import rt.sections;
19 void initStaticDataGC()
21 foreach (ref sg; SectionGroup)
23 foreach (rng; sg.gcRanges)
24 GC.addRange(rng.ptr, rng.length);