Re: Print debug data

2024-04-24 Thread mw via Digitalmars-d-learn
On Monday, 17 July 2023 at 03:43:04 UTC, Alain De Vos wrote: Is it possible to print runtime memory usage of: -The stack -The heap -The garbage collector ? And how to print the memory stats of each class / struct type? 

Re: Print debug data

2023-07-20 Thread Dennis via Digitalmars-d-learn
On Wednesday, 19 July 2023 at 01:13:23 UTC, Steven Schveighoffer wrote: It's kind of a terrible message, I wish it would change to something more informative. As of https://github.com/dlang/dmd/pull/15430, there's a new message: ``` accessing non-static variable `freeSize` requires an

Re: Print debug data

2023-07-18 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/18/23 5:04 PM, Alain De Vos wrote: ? use `stats` instead of `Stats`. The `Stats` name is the type, whereas the `stats` method is the call that gets the stats. It's kind of a terrible message, I wish it would change to something more informative. -Steve

Re: Print debug data

2023-07-18 Thread Alain De Vos via Digitalmars-d-learn
?

Re: Print debug data

2023-07-18 Thread Kagamin via Digitalmars-d-learn
Naming is hard.

Re: Print debug data

2023-07-18 Thread devosalain via Digitalmars-d-learn
``` import std.stdio:writeln; import core.memory; void main(){ ulong a=GC.Stats.freeSize; writeln(a); } ``` returns error: Error: need this for freeSize of type ulong

Re: Print debug data

2023-07-16 Thread Chris Katko via Digitalmars-d-learn
On Monday, 17 July 2023 at 03:43:04 UTC, Alain De Vos wrote: Is it possible to print runtime memory usage of: -The stack -The heap -The garbage collector ? there's gc.stats for part of it: https://dlang.org/library/core/memory/gc.stats.html

Print debug data

2023-07-16 Thread Alain De Vos via Digitalmars-d-learn
Is it possible to print runtime memory usage of: -The stack -The heap -The garbage collector ?