comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Idl is greedy, once it gets some memory it will NOT release it.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Idl is greedy, once it gets some memory it will NOT release it. [message #5529] Mon, 15 January 1996 00:00
rxr is currently offline  rxr
Messages: 1
Registered: January 1996
Junior Member
Hello all:
I have a question on IDL's memory management. My problem could also be in the
swap space management in the SUNOS and IRIX 5.3, but I doubt it.
The issue is, after an array is deleted in IDL, the memory it occupied does not
seem to be released (is the impression you get when you make an enquiry on the
swap space from the O/S (swap -s in IRIX)) until the IDL session is exited;
but seems to have been when you make an enquiry on the memory in IDL, using
help, /memory.

The following is a transcript of an hypothetical session.

1. swap space before IDL is started.
andaman 21% swap -s
total: 1.98m allocated + 45.34m add'l reserved = 47.32m bytes used, 633.31m
bytes available

andaman 22% idl
IDL. Version 4.0 (IRIX mipseb).
Copyright 1989-1995, Research Systems, Inc.
All rights reserved. Unauthorized reproduction prohibited.
Installation number: 9199-0.
Licensed for use by: andaman at JPL

% Compiled module: PSOFF.
% Compiled module: PSON.
% Compiled module: PSONC.
% Compiled module: TEK4105.
% Compiled module: PSOFFCLOSET.
% Compiled module: PSOFFPLP.
% Compiled module: WPORT.
raghu startup completed

2. swap space after IDL is started.
IDL> $swap -s
total: 1.98m allocated + 46.64m add'l reserved = 48.61m bytes used, 632.02m
bytes available

3. help on memory.
IDL> help,/memory
heap memory in use: 76495, calls to MALLOC: 139, FREE: 34

4. Allocate a large array
IDL> filter14=fltarr(182,161,365)

5. enquire on swap; swap should and has increased.
IDL> $swap -s
total: 1.96m allocated + 87.45m add'l reserved = 89.41m bytes used, 591.22m
bytes available

6. enquire on memory; memory should and has increased.
IDL> help,/memory
heap memory in use: 42857598, calls to MALLOC: 144, FREE: 35

7. create another large array
IDL> filter15=filter14

8. enquire on swap; swap should and has increased.
IDL> $swap -s
total: 3.98m allocated + 126.27m add'l reserved = 130.26m bytes used, 550.37m
bytes available

9. enquire on memory; memory should and has increased.
IDL> help,/memory
heap memory in use: 85638690, calls to MALLOC: 149, FREE: 36

10. Delete one of the large variables.
IDL> delvar,filter15

11. enquire on swap; swap should have but has NOT decreased.
IDL> $swap -s
total: 3.98m allocated + 126.27m add'l reserved = 130.26m bytes used, 550.37m
bytes available

12. enquire on memory; memory should have and has decreased.
IDL> help,/memory
heap memory in use: 42857772, calls to MALLOC: 154, FREE: 39

13. exit IDL
IDL> exit

14. enquire on swap after exitting IDL; swap should have and has decreased.
andaman 23% swap -s
total: 3.98m allocated + 43.34m add'l reserved = 47.33m bytes used, 633.30m
bytes available

Any suggestions.

raghu.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: idltags : VMS version??
Next Topic: Re: How does one read in simple binary files?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:52:42 PDT 2025

Total time taken to generate the page: 0.00587 seconds