Thread overview | ||||||
---|---|---|---|---|---|---|
|
August 23, 2017 Tools to help me find memory leaks? | ||||
---|---|---|---|---|
| ||||
I'm on a Windows 7 machine and I'm using VisualD as my IDE. I'm trying to work out what's chewing up all the RAM in a program I'm writing... is there a tool that I can use that'll show me what in my program keeps allocating memory? Thanks |
August 23, 2017 Re: Tools to help me find memory leaks? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Drake44 | On Wednesday, 23 August 2017 at 17:30:40 UTC, Drake44 wrote:
> I'm on a Windows 7 machine and I'm using VisualD as my IDE. I'm trying to work out what's chewing up all the RAM in a program I'm writing... is there a tool that I can use that'll show me what in my program keeps allocating memory?
>
> Thanks
If you are using the gc then compile with -profile=gc.
Which will generate a file that logs all gc allocations.
On exiting the program normally.
So make sure you can exit via a keypress or after a timelimit has passed.
If you are using malloc / calloc / free
you'll have to use a tool like valgrind.
|
August 25, 2017 Re: Tools to help me find memory leaks? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Drake44 | I always use "valgrind --tool=massif" + "massif-visualizer". Gives me a nice timeline allowing to find quickly who the big memory consumers (allocation sites) are. |
March 11, 2018 Re: Tools to help me find memory leaks? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stefan Koch | On Wednesday, 23 August 2017 at 20:52:17 UTC, Stefan Koch wrote: > On Wednesday, 23 August 2017 at 17:30:40 UTC, Drake44 wrote: >> I'm on a Windows 7 machine and I'm using VisualD as my IDE. I'm trying to work out what's chewing up all the RAM in a program I'm writing... is there a tool that I can use that'll show me what in my program keeps allocating memory? >> >> Thanks > > If you are using the gc then compile with -profile=gc. > Which will generate a file that logs all gc allocations. This will not displays number of deallocations. And problem is usually with the fact that something is allocated but not deallocated by GC for some reason. > On exiting the program normally. > So make sure you can exit via a keypress or after a timelimit has passed. > > If you are using malloc / calloc / free > you'll have to use a tool like valgrind. |
Copyright © 1999-2021 by the D Language Foundation