search for: getelapsedwalltime

Displaying 3 results from an estimated 3 matches for "getelapsedwalltime".

2014 Mar 19
2
[LLVMdev] getElapsedWallTime unnecessary heap allocation and memory leak
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > On Behalf Of Bryan Keiren > Subject: [LLVMdev] getElapsedWallTime unnecessary heap allocation and memory leak > In the file \lib\Support\Process.cpp on line 60, it seems as though an > unnecessary heap allocation and memory leak occurs. > static TimeValue getElapsedWallTime() { >  static TimeValue &StartTime = *new TimeValue(TimeValue::now());...
2014 Mar 19
2
[LLVMdev] getElapsedWallTime unnecessary heap allocation and memory leak
...ll threads before main exits. Is that the case? Good for you if so! > > > -----Original Message----- > From: Caldarale, Charles R [mailto:Chuck.Caldarale at unisys.com] > Sent: Wednesday, March 19, 2014 14:42 > To: Bryan Keiren; llvmdev at cs.uiuc.edu > Subject: RE: [LLVMdev] getElapsedWallTime unnecessary heap allocation and > memory leak > > > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] > > On Behalf Of Bryan Keiren > > Subject: [LLVMdev] getElapsedWallTime unnecessary heap allocation and > > memory leak > > > In th...
2014 Mar 19
3
[LLVMdev] getElapsedWallTime unnecessary heap allocation and memory leak
In the file \lib\Support\Process.cpp on line 60, it seems as though an unnecessary heap allocation and memory leak occurs. This is the offending code: static TimeValue getElapsedWallTime() { static TimeValue &StartTime = *new TimeValue(TimeValue::now()); return TimeValue::now() - StartTime; } The issue is that the StartTime variable's value is allocated on the heap, after which a *reference* to it is stored (not the pointer itself). This means that the allocated memory...