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

Home » Public Forums » archive » Re: about memory
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: about memory [message #25148 is a reply to message #25147] Mon, 21 May 2001 15:38 Go to previous messageGo to previous message
Amar Nayegandhi is currently offline  Amar Nayegandhi
Messages: 15
Registered: May 2001
Junior Member
This is a general question about memory management.
can i free memory allocated to an array if I have finished using it in
the program? suppose
arr_a = fltarr(10000,10000)
if i don't need array arr_a anymore, would
arr_a = 0
free the memory used by arr_a? I would expect it to now utilize only
2(or 4) bytes of memory.

this may be helpful to you, Hong. if you have multiple Tb arrays, and
are not using them anymore in the program, you can free some memory by
initializing Tb to 0(if it works!)

-amar

William Thompson wrote:
>
> Hong Gang <honggang@uni-bremen.de> writes:
>
>> Hallo all,
>
>> The following is the error given by my program.
>> % Unable to allocate memory: to make array.
>> Cannot allocate memory
>
>> I have some large arrays as Tb(632*664, 880). I do not know what is the
>> matter with the program. Can anyone give me some idea?
>
> IDL is telling you that the operating system is not allowing it to allocate
> enough memory to create the array. It's not surprising; a floating point array
> of that size would take well over a gigabyte of memory. Generally speaking,
> you'd need several times that much memory to manipulate such an array.
>
> You don't mention what operating system you're using. If Unix, then you can
> find out how much memory the operating system will allow you to have by
> entering in the command "limit" (before calling IDL). You can also type
> "limit -h" to find the hard limits. The relevant number is "datasize". You
> can increase this, e.g. "limit datasize 200000" would give you 200 megabytes of
> memory.
>
> Probably, you should rewrite your software to manipulate your data in pieces,
> instead of all at once. One way to do this is to write your data to a file,
> and then use the ASSOC() function to address parts of the file.
>
> William Thompson

--
*************************************************
Murphy's Law of Research:
Enough research will tend to support your theory.
*************************************************
Amar Nayegandhi
Graduate Student
Department of Computer Science,
University of South Florida, Tampa.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [Newbie]writing JPEG or GIF file with plot?
Next Topic: Checkbox Starting Checked

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

Current Time: Wed Oct 08 15:17:16 PDT 2025

Total time taken to generate the page: 0.00418 seconds