Re: How do I free memory? [message #2461] |
Wed, 13 July 1994 09:24  |
caron
Messages: 16 Registered: May 1994
|
Junior Member |
|
|
In article <3009vu$1q3@hermod.uio.no>, steinhh@amon.uio.no (Stein Vidar Hagfors Haugan) writes:
|>
|> In article <GEOMAGIC.94Jul12152036@moe.seismo.do.usbr.gov>, geomagic@seismo.do.usbr.gov (Dan O-Connell) writes:
|> |> In article <1994Jul12.152415.23858@noao.edu> eharold@corona.sunspot.noao.edu (Elliotte Harold) writes:
|> |> [..]
|> |> > When I free an array how do I get IDL to give up the memory it
|> |> > grabbed to get the array in the first place? I think IDL can reuse
|> |> > the 39 megabytes if it needs it but I'd like to make that memory available
|> |> > to any other process running on my machine, not just IDL.
|> |>
|> |> Delvar deletes variables and deallocates their memory.
|> |>
|>
|> But this doesn't really give the memory back to the operating system.
|> The problem is in unix, and has nothing to do with IDL. Any other program
|> using large memory chunks has the same problem.
|>
|> So, no cure is available (under UNIX, that is)
Remember you are on a virtual memory machine. Whats important to performance
is the amount of physical memory you need to satisfy memory requests. Its true
that when you "free" memory you dont decrease the virtual adrress space, but
(assuming you have enough swap space) that doesnt effect performance really.
Its a good idea to free unneeded memory, so that your programs virtual space
stays as compact as possible.
See July 1994 Unix Review "Understanding SVR4 Memory Allocation" for gory
details.
|
|
|