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

Home » Public Forums » archive » System Resources ???
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
System Resources ??? [message #5807] Fri, 23 February 1996 00:00 Go to previous message
Jim Brown is currently offline  Jim Brown
Messages: 8
Registered: November 1995
Junior Member
Hello all,

I have been digging through the IDL Manual to find some information
on Memory Allocation, but I am having trouble finding the
answer to my question:

I am a bit concerned with how IDL handles the allocation of
system resources. Things evidently are not being freed up
properly (or I do not know how to free up memory properly).

For example, when I run the following command:

IDL> arr = dblarr(144,73,12,20)

the memory appears to be allocated as expected:

Results from 'top' command:

PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
25955 jtb 34 0 27M 22M sleep 0:04 4.04% 0.00% idl

Results from 'help, /memory':

IDL> help, /memory
heap memory in use: 20303069, calls to MALLOC: 162, FREE: 45


Now if I try to free up this space:

IDL> delvar, arr

'top' still reports SIZE=27M and RES=22M.

Another problem, is this 'delvar' command only works from the top-level
routine. If I need to do some array processing, especially in some
lower-level subroutines, is there some slick way to free up the system
resources that IDL appears to be holding onto that is no longer needed?
The only way I see that space is freed up is by running:

IDL> exit

Not quite what I want to do in the middle of a program!

I am getting pretty frustrated in that the whole scheme of memory allocation
in IDL appears to be quite inefficient. If anybody has any tips on how
to work with large arrays and then freeing up their space when finished,
I would appreciate the help. I have looked into the use of the 'temporary'
call, but I think that just keeps extra memory from being allocated. I
am not sure that addresses the issue of freeing up space that is no longer
needed.

Thanks,

Jim
============================================================ ==============
James T. Brown
CIRES - Cooperative Institute for Research in Environmental Sciences
University of Colorado

email: jtb@cdc.noaa.gov
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Resize Window => Redraw contents
Next Topic: widget slider

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

Current Time: Wed Oct 08 17:00:06 PDT 2025

Total time taken to generate the page: 0.00379 seconds