Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

root/tags/releases/0.99.8/lib/gc/basic/gcstats.d

Revision 1856, 1.4 kB (checked in by sean, 5 years ago)

Merged in final GDC 0.23 changes. These changes have also been applied to the DMD runtime where applicable. As most of these changes were replacing instances of int/uint with ptrdiff_t/size_t, there should be no noticeable difference in DMD behavior from these changes.

Please note that some changes were necessary to the GC as well, and I am trusting that Dave Friedman got things right. Again, most of these were changes from uint to size_t, but things here seem a bit less clear-cut than most of the changes to the GDC runtime itself.

Finally, it is worth being aware that of the GC code, only gcx.d is really pretty much the same between Tango and Phobos/GPhobos. The remaining files are split among the GC directory (gc/basic), and the files lifetime.d and memory.d in the compiler runtime code. The Tango design is far cleaner, but the structural differences complicate merging changes in this area. I've triple-checked all changes for this merge, but if there are any functional problems, I expect them to concern these GC-related files.

  • Property svn:eol-style set to native
Line 
1 /**
2  * This module contains garbage collector statistics functionality.
3  *
4  * Copyright: Copyright (C) 2005-2006 Digital Mars, www.digitalmars.com.
5  *            All rights reserved.
6  * License:
7  *  This software is provided 'as-is', without any express or implied
8  *  warranty. In no event will the authors be held liable for any damages
9  *  arising from the use of this software.
10  *
11  *  Permission is granted to anyone to use this software for any purpose,
12  *  including commercial applications, and to alter it and redistribute it
13  *  freely, in both source and binary form, subject to the following
14  *  restrictions:
15  *
16  *  o  The origin of this software must not be misrepresented; you must not
17  *     claim that you wrote the original software. If you use this software
18  *     in a product, an acknowledgment in the product documentation would be
19  *     appreciated but is not required.
20  *  o  Altered source versions must be plainly marked as such, and must not
21  *     be misrepresented as being the original software.
22  *  o  This notice may not be removed or altered from any source
23  *     distribution.
24  * Authors:   Walter Bright, Sean Kelly
25  */
26
27
28 /**
29  *
30  */
31 struct GCStats
32 {
33     size_t poolsize;        // total size of pool
34     size_t usedsize;        // bytes allocated
35     size_t freeblocks;      // number of blocks marked FREE
36     size_t freelistsize;    // total of memory on free lists
37     size_t pageblocks;      // number of blocks marked PAGE
38 }
Note: See TracBrowser for help on using the browser.