Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Freeing memory in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg19498] Freeing memory in Mathematica
  • From: bettina_hansen at writeme.com
  • Date: Sat, 28 Aug 1999 15:53:19 -0400
  • Organization: Deja.com - Share what you know. Learn what you don't.
  • Sender: owner-wri-mathgroup at wolfram.com

Hallo everyone.

I was trying to make a Mathematica program which make some calculations
on several long (and very large) lists. However, after the calculation
of each list, the list is no longer needed. So I tried to delete it
using listname=. However it seems that this is not working in the sense
that it is still present in memory. Finally I found out how to free the
memory, see the following. Can anyone tell me how to do this more
'nice'? (i.e. without the use of the NoUse variable?)

The program is written in the file 'test.m'. The first program shows how
I want it to be, but as is seen this does not work.

  Print[MemoryInUse[]]
  list=Table[Sqrt[i],{i,1,20000}];
  Print[MemoryInUse[]]
  list=.
  Print[MemoryInUse[]]

Gives, when 'executing' <<Test.m :

  836032
  1906640
  1906640

I.e. the list is not deleted from memory. The second program, however,
works fine:

  Print[MemoryInUse[]]
  list=Table[Sqrt[i],{i,1,20000}]; NoUse=1;
  Print[MemoryInUse[]]
  list=.
  Print[MemoryInUse[]]

Gives:
  836032
  1906744
  836352

?????????????????????? Please help me here......  ;-)

Best regards

Bettina


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


  • Prev by Date: Problem with conditional definitions
  • Next by Date: Re: unevaluatedsdi integral
  • Previous by thread: Re: Problem with conditional definitions
  • Next by thread: Re: Freeing memory in Mathematica