Possible solution for: oc> Cannot allocate memory

Post Reply
Raj
Posts: 220
Joined: Thu Jun 09, 2005 1:09 pm
Location: Groningen, The Netherlands
Contact:

Possible solution for: oc> Cannot allocate memory

Post by Raj »

If running NEURON on MSWin you run into the message "Cannot allocate memory" while you still have a large amount of memory available, it is probably caused by the maximum program size of applications run under cygwin. Cygwin's maximum program size can be adjusted with cygwin's regtool:

http://www.cygwin.com/cygwin-ug-net/setup-maxmem.html
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

Thanks. I haven't seen that error msg yet, but if it occurs I now know
what to do.
eschombu

Re: Possible solution for: oc> Cannot allocate memory

Post by eschombu »

I just came across this error while running simulations on a unix system. I'm saving lots of data to files for several different runs, but encompassed within a single script. It gets through a few cases, writing almost a GB of output files to a separate folder for each, but then starts giving me the "oc> Cannot allocate memory" message. I'm pretty sure all file streams are getting closed and I'm reinitializing the same variable names, but are there ways to check these sorts of memory issues at the command line or within hoc code? I can work around these problems and be more efficient with which data I save, but I'm curious in a general sense. Once I start more parameter tuning, this may become an issue.

Thanks!
hines
Site Admin
Posts: 1691
Joined: Wed May 18, 2005 3:32 pm

Re: Possible solution for: oc> Cannot allocate memory

Post by hines »

I would watch the memory usage with 'top' in a another terminal window while the simulation was running.
It may be the case that Vector's are being held in one of your lists and not being freed. You can know the
existence of Vectors with
objref zzz
zzz = new List("Vector")
and occasionally see the total they are using with
xxx = 0
for i =0, zzz.count-1 { xxx = zzz.o(i).size() ]
print xxx

If that is increasing then find out who references a Vector you think should be deleted via
StringFunctions[0].references(Vector[...])
Post Reply