[Issue 11021] Huge GC leak leads to crash; GC uses 7x more memory

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Sep 13 11:51:18 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11021


Dmitry Olshansky <dmitry.olsh at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmitry.olsh at gmail.com


--- Comment #8 from Dmitry Olshansky <dmitry.olsh at gmail.com> 2013-09-13 11:51:16 PDT ---
(In reply to comment #0)
> import core.memory;
> import std.traits;
> 
> void main() {
>     while(true) {
>         GC.collect();
>         new ubyte[40 * 1024 * 1024];
>     }
> }
> 
> Application's memory usage grows and it crashes with message:
> core.exception.OutOfMemoryError
> 
> If i comment import std.traits; everything goes OK, but now application uses
> 300 MM of memory.

32bits? Allocating large blocks in a loop? 
Good luck with that... sooner or later they would be pinned by something that
looks like a pointer to GC.  We are back to false pointers and precise
collection topic.

How std.traits affects that is interesting thing, maybe inflates executable
size. Anyway this is game of chance so any slight change may avoid it or bring
it back.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list