I am reading rows from a sqlite db, looping over them and then using the variables from each row as arguments for a function which generates plots, something like the following pseudo code
conn=sqlite3.connect(db)
c=conn.cursor()
myrows=c.execute("select * from values WHERE var=1")
for burst in myrows:
met=burst[1]
make_plot(met)
c.close()
After a certain amount of time this gives either one of the following errors:
1) 86392 items requested but only 0 read Segmentation fault
2) unable to alloc 3072000 bytes Aborted
3) Segmentation fault
The make_plot() has to read in a large file (~8 mB) and do some operations on the data, and there are ~500 elements in myrows. From the errors I think that I am running out of memory(?) but I haven't managed to find anything that would help me track down/diagnose this problem. Any ideas on how I would do this?