"Fossies" - the Fresh Open Source Software Archive

Member "dmd2/src/druntime/src/rt/memory.d" (20 Nov 2020, 682 Bytes) of package /linux/misc/dmd.2.094.2.linux.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) D source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    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.
    4  *
    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)
   11  */
   12 
   13 module rt.memory;
   14 
   15 
   16 import core.memory;
   17 import rt.sections;
   18 
   19 void initStaticDataGC()
   20 {
   21     foreach (ref sg; SectionGroup)
   22     {
   23         foreach (rng; sg.gcRanges)
   24             GC.addRange(rng.ptr, rng.length);
   25     }
   26 }