Ticket #6081 (closed: fixed)
Apparent memory leak on linux platforms
Reported by: | Martyn Gigg | Owned by: | Martyn Gigg |
---|---|---|---|
Priority: | critical | Milestone: | Release 2.3 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Owen Arnold |
Description
Run the script below with the memory manager open, noting the memory at the start. At then end of the script, even though all workspaces have been deleted, the memory is not back to where it started.
_range = range(0, 3) Load('WISH00016748.raw',OutputWorkspace='WISH00016748') for i in _range: CloneWorkspace(InputWorkspace='WISH00016748', OutputWorkspace=str(i)) for j in _range: DeleteWorkspace(Workspace=str(j)) DeleteWorkspace('WISH00016748')
Change History
comment:1 Changed 8 years ago by Martyn Gigg
- Status changed from new to accepted
- Owner set to Martyn Gigg
comment:2 Changed 8 years ago by Martyn Gigg
It looks as if this is yet again down to more complex memory management going on NOT an actual leak. If you run another algorithm immediately afterwards then the memory is reported correctly back to the OS and that algorithm doesn't use additional memory.
It is confusing for users though so add a releaseFreeMemory call at the end of script execution.
comment:3 Changed 8 years ago by Martyn Gigg
Add releaseFreeMemory call when script stops. Refs #6081
Changeset: 6e5a581132a8c9fab905adce6c68e08d37de0512
comment:4 Changed 8 years ago by Martyn Gigg
- Status changed from accepted to verify
- Resolution set to fixed
comment:5 Changed 8 years ago by Owen Arnold
- Status changed from verify to verifying
- Tester set to Owen Arnold
comment:6 Changed 8 years ago by Owen Arnold
- Status changed from verifying to closed
This works all memory appears to be recovered. Compared to the last nightly build that is not returning memory to the system, this is a big improvement.
comment:7 Changed 8 years ago by Martyn Gigg
Add releaseFreeMemory call when script stops. Refs #6081
Changeset: 6e5a581132a8c9fab905adce6c68e08d37de0512
comment:8 Changed 8 years ago by Martyn Gigg
Add releaseFreeMemory call when script stops. Refs #6081
Changeset: 6e5a581132a8c9fab905adce6c68e08d37de0512