Re: New Garbage Collector?

2017-07-25 Thread Nick Treleaven via Digitalmars-d

On Saturday, 22 July 2017 at 10:17:49 UTC, Temtaime wrote:

The new precise GC will be never added to druntime.


2.075 has precise scanning of the DATA and the TLS segments (on 
Windows):

http://dlang.org/spec/garbage.html#precise_dataseg

This seems like significant progress towards precise scanning of 
the heap.


Re: New Garbage Collector?

2017-07-23 Thread Moritz Maxeiner via Digitalmars-d

On Sunday, 23 July 2017 at 09:54:36 UTC, Moritz Maxeiner wrote:


Have you read the excellent blog posts about to use the GC in D 
by Micheal Parker [2][3]?


* Have you read the excellent blog posts about how to use the GC 
in D by Michael Parker [2][3]?


Sorry about that.


[2] http://dlang.org/blog/2017/03/20/dont-fear-the-reaper/
[3] https://dlang.org/blog/2017/06/16/life-in-the-fast-lane/





Re: New Garbage Collector?

2017-07-23 Thread Moritz Maxeiner via Digitalmars-d

On Sunday, 23 July 2017 at 09:34:09 UTC, Temtaime wrote:

On Saturday, 22 July 2017 at 16:35:03 UTC, Igor Shirkalin wrote:

On Saturday, 22 July 2017 at 10:17:49 UTC, Temtaime wrote:

On Saturday, 22 July 2017 at 04:53:17 UTC, aedt wrote:
In the forum, I saw a thread about someone working on a new 
GC. Just wanted to know if there's any updates on that. And 
what issues is it going to fix..


Personally, I would be greatly delighted if it acknowledges 
the Stop-The-World problem[1]. Going around it is shown not 
to be impossible[2]. I do understand it's not trivial task 
but how is the community/core devs supporting this?


[1] https://dlang.org/spec/garbage.html
[2] https://hub.docker.com/r/nimlang/nim/


The new precise GC will be never added to druntime.
It is dead, man.


Are you real developer of new GC?


I am that who sees _no progress_ for many years.


Slow progress != no progess [1]


Current implementation does memory leaks


Which bug reports are you referring to specifically?


works slow


It's not the best a non-generational stop-the-world 
mark-and-sweep GC can be, but in my experience it's good enough 
for non-realtime applications as long as you don't use it for 
huge memory chunks (i.e. stick to objects without large arrays).



and has some other disadvantages.


Which are you referring to?


And we will suffer from this many years.


Have you read the excellent blog posts about to use the GC in D 
by Micheal Parker [2][3]?


[1] https://github.com/dlang/druntime/commits/master/src/gc
[2] http://dlang.org/blog/2017/03/20/dont-fear-the-reaper/
[3] https://dlang.org/blog/2017/06/16/life-in-the-fast-lane/


Re: New Garbage Collector?

2017-07-23 Thread Temtaime via Digitalmars-d

On Saturday, 22 July 2017 at 16:35:03 UTC, Igor Shirkalin wrote:

On Saturday, 22 July 2017 at 10:17:49 UTC, Temtaime wrote:

On Saturday, 22 July 2017 at 04:53:17 UTC, aedt wrote:
In the forum, I saw a thread about someone working on a new 
GC. Just wanted to know if there's any updates on that. And 
what issues is it going to fix..


Personally, I would be greatly delighted if it acknowledges 
the Stop-The-World problem[1]. Going around it is shown not 
to be impossible[2]. I do understand it's not trivial task 
but how is the community/core devs supporting this?


[1] https://dlang.org/spec/garbage.html
[2] https://hub.docker.com/r/nimlang/nim/


The new precise GC will be never added to druntime.
It is dead, man.


Are you real developer of new GC?


I am that who sees _no progress_ for many years. Current 
implementation does memory leaks, works slow and has some other 
disadvantages.
But no one of the « real » developers sees reason to rewrite the 
gc, because they want to play with theirs toys bringing new not 
so essential stuff to the d.

And we will suffer from this many years.


Re: New Garbage Collector?

2017-07-22 Thread Dmitry Olshansky via Digitalmars-d

On Saturday, 22 July 2017 at 04:53:17 UTC, aedt wrote:
In the forum, I saw a thread about someone working on a new GC. 
Just wanted to know if there's any updates on that. And what 
issues is it going to fix..


Personally, I would be greatly delighted if it acknowledges the 
Stop-The-World problem[1]. Going around it is shown not to be 
impossible[2]. I do understand it's not trivial task but how is 
the community/core devs supporting this?


[1] https://dlang.org/spec/garbage.html
[2] https://hub.docker.com/r/nimlang/nim/


I'm working on new GC. First iteration aims to be faster at 
allocation and at collection without changing the fundamental 
mark-sweep strategy. Second stage is getting concurrent 
collection. It wouldn't be a real-time miracle, but a pause time 
in the range of 10-20ms is possible.


Re: New Garbage Collector?

2017-07-22 Thread Stefan Koch via Digitalmars-d

On Saturday, 22 July 2017 at 16:35:03 UTC, Igor Shirkalin wrote:

On Saturday, 22 July 2017 at 10:17:49 UTC, Temtaime wrote:

On Saturday, 22 July 2017 at 04:53:17 UTC, aedt wrote:
In the forum, I saw a thread about someone working on a new 
GC. Just wanted to know if there's any updates on that. And 
what issues is it going to fix..


Personally, I would be greatly delighted if it acknowledges 
the Stop-The-World problem[1]. Going around it is shown not 
to be impossible[2]. I do understand it's not trivial task 
but how is the community/core devs supporting this?


[1] https://dlang.org/spec/garbage.html
[2] https://hub.docker.com/r/nimlang/nim/


The new precise GC will be never added to druntime.
It is dead, man.


Are you real developer of new GC?


He's not he's just a naysayer :)


Re: New Garbage Collector?

2017-07-22 Thread Igor Shirkalin via Digitalmars-d

On Saturday, 22 July 2017 at 10:17:49 UTC, Temtaime wrote:

On Saturday, 22 July 2017 at 04:53:17 UTC, aedt wrote:
In the forum, I saw a thread about someone working on a new 
GC. Just wanted to know if there's any updates on that. And 
what issues is it going to fix..


Personally, I would be greatly delighted if it acknowledges 
the Stop-The-World problem[1]. Going around it is shown not to 
be impossible[2]. I do understand it's not trivial task but 
how is the community/core devs supporting this?


[1] https://dlang.org/spec/garbage.html
[2] https://hub.docker.com/r/nimlang/nim/


The new precise GC will be never added to druntime.
It is dead, man.


Are you real developer of new GC?


Re: New Garbage Collector?

2017-07-22 Thread tetyys via Digitalmars-d

On Saturday, 22 July 2017 at 10:17:49 UTC, Temtaime wrote:

The new precise GC will be never added to druntime.
It is dead, man.


Why?


Re: New Garbage Collector?

2017-07-22 Thread Temtaime via Digitalmars-d

On Saturday, 22 July 2017 at 04:53:17 UTC, aedt wrote:
In the forum, I saw a thread about someone working on a new GC. 
Just wanted to know if there's any updates on that. And what 
issues is it going to fix..


Personally, I would be greatly delighted if it acknowledges the 
Stop-The-World problem[1]. Going around it is shown not to be 
impossible[2]. I do understand it's not trivial task but how is 
the community/core devs supporting this?


[1] https://dlang.org/spec/garbage.html
[2] https://hub.docker.com/r/nimlang/nim/


The new precise GC will be never added to druntime.
It is dead, man.


New Garbage Collector?

2017-07-21 Thread aedt via Digitalmars-d
In the forum, I saw a thread about someone working on a new GC. 
Just wanted to know if there's any updates on that. And what 
issues is it going to fix..


Personally, I would be greatly delighted if it acknowledges the 
Stop-The-World problem[1]. Going around it is shown not to be 
impossible[2]. I do understand it's not trivial task but how is 
the community/core devs supporting this?


[1] https://dlang.org/spec/garbage.html
[2] https://hub.docker.com/r/nimlang/nim/



[Issue 13801] New: Garbage collector fails to work after lots of small allocations

2014-11-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13801

  Issue ID: 13801
   Summary: Garbage collector fails to work after lots of small
allocations
   Product: D
   Version: D2
  Hardware: x86_64
OS: Mac OS X
Status: NEW
  Severity: critical
  Priority: P1
 Component: druntime
  Assignee: nob...@puremagic.com
  Reporter: dl...@chillichef.com

The program below uses around 3.5GB of RAM on my machine.

 - Commenting out the arr allocation reduces it to 860KB.
 - Commenting out the list appending reduces it to 8.8MB.

This is seriously affecting me as my program is now allocating over 10GB before
OOM'ing.

Things to note:
 - Reduce the size multiplier to only 1000 and the amount of memory being used
drops to hardly anything.
 - Increase the multiplier to 3000 and the amount of memory being used
drastically increases.


---

import core.memory : GC;

import std.range : iota;

const ulong size = chunkSize * 2000;
const ulong chunkSize = 4 * 1024 * 1024;

immutable struct S {
  string a;
  ulong b;
}

void main() {
  S[] list;

  foreach(i; iota(0, size, chunkSize)) {
list ~= S(, i);
  }

  while(true) {
ubyte[] arr = new ubyte[chunkSize];
//GC.collect();
//GC.minimize();
  }
}

--