Upper memory limit

Siegfried Gonzi siegfried.gonzi at kfunigraz.ac.at
Tue May 14 13:15:36 EDT 2002


Michael Gilfix wrote:
> 
>   I got the impression from your first post that you were complaining
> that Python wasn't freeing memory at all (I could be totally
> off). Perhaps the problem might be circular references? Is your
> data structure self-referential? If so, you should be using
> weakref's. There's nothing python can do to free circular references
> because it always thinks they're in use.


First I have to say that I installed Linux (SuSE 7.2) on my stationary
machine (Pentium III, 450 MHz, 128 MB RAM). And this first email is
composed on Linux and Netscape. I plan to install also Linux on my
laptop (if someone has any hints for my Gericom machine, please let me
know; installing on may stationary machine was smooth and
unproblematically; only a Mac OS installation is easier). I hope  
Python's behavior on Linux is somewhat better.


Python disposes the memory after completing the calculation (I can see
it in the task manager). But nobody has answered my question: Is Python
just a garbage collector or a garbace collector *and* remover?

The hint: reboot your Krempel every hour does not always work. In the
afternoon I started a calculation at about 3 pm. I am sitting (in the
meantime I have even successfully installed Linux) still here and wait
until the calculation comes to an end (note: before I fired up the
calculation I  rebooted the system).

I cannot comprehend the following: As I wrote, I call 8 times the same
function, and it is interesting to observe that the first call to the
function takes about 10-15 minutes, the second call also 10-15minutes,
but the successive calls become always longer and longer; after 4 hours
I am at my 6. call and still waiting.


I have to underline that I do not use any object oriented programming
technique (I assume you meant this when you write "self"). I use simple
functions. Okay I have to admit that I make heavy use of the following
scheme:

def f(list,list2):
	erg = []
	for k in range( len(list) ):
		erg.append( function_on_list2( list2[j] ) )
	return erg


I find the above very readable (and often better in style than Numeric's
idiosyncrasy).

I hope I can make the transition to Linux in the next few month (hoping
that the installation on my laptop will succeed).


Burschen mein Vehrerung,
Siegfried Gonzi





More information about the Python-list mailing list