gc: Remove resetThreadLocalStats()#2629
Conversation
Having a way to reset the total memory allocated in a thread is a bad API design as if there are multiple clients they will be competing for the reset. Instead clients can store the previous value and subtract the next reading to know how much memory was allocated between two arbitrary points and deal with potential overflow.
|
Thanks for your pull request, @leandro-lucarella-sociomantic! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + druntime#2629" |
|
Just for the records, using the 2 commands to use digger to test locally doesn't work. I have installed the Error messages
|
Well, looks like you can't even build digger. Could you report this at the digger repo? Thanks. |
Ok, trying in an empty directory (I tried it in the druntime repo) seems to work. There was an interfering |
|
FYI @RazvanN7 |
|
Thanks, @leandro-lucarella-sociomantic |
As pointed out by @rainers in #2607, having a way to reset the total memory allocated in a thread is a bad API design as if there are multiple clients they will be competing for the reset.
Instead clients can store the previous value and subtract the next reading to know how much memory was allocated between two arbitrary points and deal with potential overflow.