OS Specific
From MantidProject
Linux
When running Mantid under Linux, users will find that memory is apparently not freed when objects, such as workspaces, are deleted. This is normal behaviour and is due to the standard memory management techniques in Linux only free this memory for use by the running process. This essentially means that Mantid will use the memory that has been freed by deleting its objects but the OS cannot. As a result, when using tools such as system monitor it may seem like Mantid is leaking memory but this is in fact not the case.
As an example, the output, showing memory utilization, from Mantid is shown below.
LibraryManager created. Algorithm Factory created. Opened library: MantidNexus. Opened library: MantidAlgorithms. Opened library: MantidCurveFitting. Opened library: MantidAPI. Opened library: MantidPythonAPI. Opened library: MantidDataHandling. Opened library: MantidKernel. Opened library: GL. Opened library: MantidGeometry. Opened library: MantidDataObjects. Framework Manager created. Memory Manager created. Started memory tests with 2560000 KB of memory available Algorithm Manager created. Loaded GEM data. 1978368 KB of memory available Converted units to dSpacing. 1114112 KB of memory available Converted units to wavelength. 245760 KB of memory available Currently there are 3 workspaces: GEM38370 dspacing_GEM wavelength_GEM After creating above workspaces, we have 245760 KB of memory available. Now removing GEM38370 and dspacing from service Workspaces available: wavelength_GEM After removal we (apparently) have 245760 KB of memory available. Load some HET data into a new workspace Memory available: 245760 KB Convert units of new HET15869 workspace Workspaces available: HET15869 dspacing_HET wavelength_GEM Memory available: 245760 KB Algorithm Manager destroyed. Algorithm Factory destroyed. LibraryManager destroyed.
For a more detailed discussion of memory management issues under a UNIX like operating system, please see
- http://stackoverflow.com/questions/236001/unix-vs-windows-memory-deallocation
- http://kevin.sb.org/2007/07/05/malloc-free-space-not-reclaimed/
- http://users.actcom.co.il/~choo/lupg/tutorials/unix-memory/unix-memory.html#mm_unix
Python troubles
Please see here for information regarding troubleshooting Python and Mantid
