Memory Problem

Christoph Scheit cscheit at lstm.uni-erlangen.de
Tue Sep 18 11:24:46 EDT 2007


Hi, Thank you all very much,

so I will consider using a database. Anyway I would like
how to detect cycles, if there are.

> >> >  # add row i and increment number of rows
> >> >  self.rows.append(DBRow(self, self.nRows))
> >> >  self.nRows += 1
>
> This looks suspicious, and may indicate that your structure contains
> cycles, and Python cannot always recall memory from those cycles, and you
> end using much more memory than needed.
>
> --
> Gabriel Genellina

How can I detect if there are cycles?

self.rows is a list containing DBRow-objects,
each itself being an integer pointer (index) to the i-th row.
Im using this list in order to sort the table by sorting the index-list
instead of realy sorting the entries. (or to filter).

-- 

============================
M.Sc. Christoph Scheit
Institute of Fluid Mechanics
FAU Erlangen-Nuremberg
Cauerstrasse 4
D-91058 Erlangen
Phone: +49 9131 85 29508
============================



More information about the Python-list mailing list