| Memory problems update. [message #241] |
Wed, 08 January 1992 10:24  |
thompson
Messages: 584 Registered: August 1991
|
Senior Member |
|
|
To test the memory limitations of IDL version 1 versus version 2.2.1, I ran the
following program to see where it would crash.
for i = 1,100
j = 100*i
print,j
a = fltarr(j,j)
endfor
end
I have a pagefile quota of 78471 blocks. I chose this method primarily because
I had heard rumors that if one recreates an array that already exists with a
size bigger than it had before, the old memory is not deallocated.
IDL version 1 was unable to obtain enough memory to build the 2000x2000 array,
while IDL version 2 was unable to build the 1400x1400 array.
This seems to be consistent with IDL version 2 not deallocating the memory,
since 1400x1400 would then be where the accumulated total would exceed the
pagefile quota.
Just saying "a = fltarr(2000,2000)" in a seperate IDL 2.2.1 session does work,
however, as does
a = fltarr(1900,1900)
a = fltarr(2000,2000)
Does anybody know what causes this? Is the rumor I heard true?
Bill Thompson
|
|
|
|
| Re: Memory Problems [message #6754 is a reply to message #241] |
Fri, 16 August 1996 00:00  |
rigby
Messages: 16 Registered: September 1995
|
Junior Member |
|
|
> On another note, I was wondering if it is feasible to run a widget
> application as a background application (e.g. with a forked idl to
> support it). I have some widgets for which it would be useful to be
> able to use the idl command line without having to quit the widget. It
> is quite frustrating to quit and relaunch a large widget application
> whenever I just need to perform a small side calculation.
>
I put a "pause" button in my widget:
PRO Widget_Event, event
...
case (button) of
"pause" : begin
print, "Paused--type .con to the IDL prompt to continue"
Widget_Control, base, sensitive=0
stop
print, "(resumed)"
Widget_Control, base, /sensitive
end
...
The documentation suggests this won't work, but I use it all the time.
|
|
|
|
| Re: Memory Problems [message #6759 is a reply to message #241] |
Thu, 15 August 1996 00:00  |
thompson
Messages: 584 Registered: August 1991
|
Senior Member |
|
|
"J.D. Smith" <jdsmith@astrosun.tn.cornell.edu> writes:
> I am having memory problems when attempting to print a 2-d image to
> postscript. The images display without problem under the X device (with
> seemingly as many windows displaying as I could want), but when I
> "set_plot,'PS'" and run the same display commands, I get a "Unable to
> allocate array: Not enough memory" message. I am using IDL 4.0.1 on a
> SPARC IPX. Any thoughts?
I suspect that what you're doing is generating a new image sized to fit the
amount of graphics area available. PostScript files contain an enormous number
of pixels that you can write to. It's like having a 24130x17780 monitor to
play around with.
The way to get around this is to use the scalable pixel feature of PostScript.
This is done by using the XSIZE and YSIZE keywords with the TV or TVSCL
command.
Bill Thompson
|
|
|
|