View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0010252ITKpublic2010-02-08 11:332011-06-30 16:14
Reportermonica hernandez 
Assigned Tokentwilliams 
PrioritynormalSeveritymajorReproducibilityunable to reproduce
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionITK-3-16 
Target VersionFixed in Version 
Summary0010252: MemoryProbesCollectorBase does not work properly in my machine
DescriptionI am trying to use the class itk::MemoryProbesCollectorBase in order to
track the memory usage of my ITK based code. I am getting some weird
results, for example, my code takes 1Gb of memory usage (using top command). However the report does not provide such information. In addition
I am getting negative results of memory usage in specific locations of
my code.

I used this code below in order to allocate some memory and see if the
memory collector works fine for a simpler code. However, the report says
that the process takes 0 Kb of memory usage.

I am working on a Suse 11.0 64 bits machine.

int main( int argc, char **argv )
{
  itk::MemoryProbesCollectorBase mcollector;

  mcollector.Start( "Update" );

  size_t numberOfBytes = atol(argv[1] );
  char * buffer = new char[numberOfBytes];

  mcollector.Stop( "Update" );
  mcollector.Report();

  delete [] buffer;

  return 0;
}



Additional InformationLuis IbaƱez told me that the problem could be located at

Insight/Utilities/kwsys/SystemInformation.cxx

so maybe this class would be the starting point.

TagsNo tags attached.
Resolution Date
Sprint
Sprint Statusbacklog
Attached Files

 Relationships

  Notes
(0026900)
Hans Johnson (developer)
2011-06-17 12:50

Please convert this into a test, added it to the module.
Also add a delay in seconds (e..g. 10 seconds) between the Start and Stop calls.
(0026939)
kentwilliams (developer)
2011-06-21 11:22

I pushed a patch that implements the suggested test. I think that the delays are unnecessary -- they don't change anything about the process or its memory usage, and the MemoryProbe class only samples when you call stop.

See this patch http://review.source.kitware.com/#change,1958 [^]
(0026968)
kentwilliams (developer)
2011-06-24 16:32

http://review.source.kitware.com/#change,1958 [^] -- now actually works on OS X and Linux.
(0027000)
kentwilliams (developer)
2011-06-30 16:14

change pushed to ITK

 Issue History
Date Modified Username Field Change
2010-02-08 11:33 monica hernandez New Issue
2010-11-02 14:00 Hans Johnson Status new => assigned
2010-11-02 14:00 Hans Johnson Assigned To => Luis Ibanez
2010-11-07 03:00 Luis Ibanez Assigned To Luis Ibanez => Gabe Hart
2011-06-17 12:49 Hans Johnson Assigned To Gabe Hart => kentwilliams
2011-06-17 12:50 Hans Johnson Note Added: 0026900
2011-06-21 11:22 kentwilliams Note Added: 0026939
2011-06-24 16:32 kentwilliams Note Added: 0026968
2011-06-30 16:14 kentwilliams Sprint Status => backlog
2011-06-30 16:14 kentwilliams Note Added: 0027000
2011-06-30 16:14 kentwilliams Status assigned => closed
2011-06-30 16:14 kentwilliams Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team