Thread overview
Current size of GC memory
Nov 03, 2013
Namespace
Nov 03, 2013
Namespace
Nov 04, 2013
Rainer Schuetze
Nov 04, 2013
Namespace
Nov 04, 2013
Rainer Schuetze
Nov 05, 2013
Sean Kelly
Nov 05, 2013
Namespace
Nov 06, 2013
Sean Kelly
November 03, 2013
Is there a way to find out how much memory the GC used currently?
November 03, 2013
On Sunday, 3 November 2013 at 13:05:08 UTC, Namespace wrote:
> Is there a way to find out how much memory the GC used currently?

Does not seem to be possible. Would have been nice.
November 04, 2013

On 03.11.2013 19:53, Namespace wrote:
> On Sunday, 3 November 2013 at 13:05:08 UTC, Namespace wrote:
>> Is there a way to find out how much memory the GC used currently?
>
> Does not seem to be possible. Would have been nice.

There is an "unofficial" function gc_stats here: https://github.com/D-Programming-Language/druntime/blob/master/src/gc/proxy.d#L276
November 04, 2013
On Monday, 4 November 2013 at 06:38:41 UTC, Rainer Schuetze wrote:
>
>
> On 03.11.2013 19:53, Namespace wrote:
>> On Sunday, 3 November 2013 at 13:05:08 UTC, Namespace wrote:
>>> Is there a way to find out how much memory the GC used currently?
>>
>> Does not seem to be possible. Would have been nice.
>
> There is an "unofficial" function gc_stats here: https://github.com/D-Programming-Language/druntime/blob/master/src/gc/proxy.d#L276

And how can I use it? import gc.proxy; doesn't work.
November 04, 2013

On 04.11.2013 11:23, Namespace wrote:
> On Monday, 4 November 2013 at 06:38:41 UTC, Rainer Schuetze wrote:
>>
>>
>> On 03.11.2013 19:53, Namespace wrote:
>>> On Sunday, 3 November 2013 at 13:05:08 UTC, Namespace wrote:
>>>> Is there a way to find out how much memory the GC used currently?
>>>
>>> Does not seem to be possible. Would have been nice.
>>
>> There is an "unofficial" function gc_stats here:
>> https://github.com/D-Programming-Language/druntime/blob/master/src/gc/proxy.d#L276
>>
>
> And how can I use it? import gc.proxy; doesn't work.

You need to add <dmd-install-path>/src/druntime/src to the import search paths.
November 05, 2013
On Monday, 4 November 2013 at 22:25:14 UTC, Rainer Schuetze wrote:
>
> On 04.11.2013 11:23, Namespace wrote:
>>
>> And how can I use it? import gc.proxy; doesn't work.
>
> You need to add <dmd-install-path>/src/druntime/src to the import search paths.

Or simply declare the extern (C) function in your code.
November 05, 2013
On Tuesday, 5 November 2013 at 19:49:06 UTC, Sean Kelly wrote:
> On Monday, 4 November 2013 at 22:25:14 UTC, Rainer Schuetze wrote:
>>
>> On 04.11.2013 11:23, Namespace wrote:
>>>
>>> And how can I use it? import gc.proxy; doesn't work.
>>
>> You need to add <dmd-install-path>/src/druntime/src to the import search paths.
>
> Or simply declare the extern (C) function in your code.

And what is with the return type? It's a struct. You must import it.
November 06, 2013
On Tuesday, 5 November 2013 at 20:19:03 UTC, Namespace wrote:
>
> And what is with the return type? It's a struct. You must import it.

You don't have to import it.  The layout of the struct isn't going to change any time soon.  Just copy/paste the definition into your code.  Or import it if you want.  It's just that the original definition of this stuff is in a portion of Druntime that was never intended to be published to a location where the module could be imported by users.