1*627f7eb2Smrg /** 2*627f7eb2Smrg * This module tells the garbage collector about the static data and bss segments, 3*627f7eb2Smrg * so the GC can scan them for roots. It does not deal with thread local static data. 4*627f7eb2Smrg * 5*627f7eb2Smrg * Copyright: Copyright Digital Mars 2000 - 2012. 6*627f7eb2Smrg * License: Distributed under the 7*627f7eb2Smrg * $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0). 8*627f7eb2Smrg * (See accompanying file LICENSE) 9*627f7eb2Smrg * Authors: Walter Bright, Sean Kelly 10*627f7eb2Smrg * Source: $(DRUNTIMESRC src/rt/_memory.d) 11*627f7eb2Smrg */ 12*627f7eb2Smrg 13*627f7eb2Smrg module rt.memory; 14*627f7eb2Smrg 15*627f7eb2Smrg 16*627f7eb2Smrg import core.memory; 17*627f7eb2Smrg import rt.sections; 18*627f7eb2Smrg initStaticDataGC()19*627f7eb2Smrgvoid initStaticDataGC() 20*627f7eb2Smrg { 21*627f7eb2Smrg foreach (ref sg; SectionGroup) 22*627f7eb2Smrg { 23*627f7eb2Smrg foreach (rng; sg.gcRanges) 24*627f7eb2Smrg GC.addRange(rng.ptr, rng.length); 25*627f7eb2Smrg } 26*627f7eb2Smrg } 27