Memory allocation problem with python 2.4.3

  • Thread starter Brice-Olivier Demory
  • Start date
B

Brice-Olivier Demory

Hi,

I'm encountering an odd problem while running a python script which
calls a C program
called 'st_time' :

Traceback (most recent call last):
File "ccdd.py", line 177, in ?
answer=proc_request(conn,addr,request) # proc
the
request
File "ccdd.py", line 69, in proc_request
answer = '1&%s'%(ccd.exec_function(fct,arg))
File "/opt/OFXB/lib/python2.4/site-packages/ccdlib.py", line 204, in
exec_function
return apply(self.funcs[name],args)
File "/opt/OFXB/lib/python2.4/site-packages/ccdlib.py", line 731, in
mpose
answer = self.download()
File "/opt/OFXB/lib/python2.4/site-packages/ccdlib.py", line 1152,
in download
st = libastro.st_time(ut,LON)
File "/opt/OFXB/lib/python2.4/site-packages/libastro.py", line 169,
in st_time
raise e
OSError: [Errno 12] Cannot allocate memory

This error is far from appearing each time I invoke st_time. To debug
this problem,
a friend of mine tried to get memory information as soon as this error
is raised. Here, it
returns :

MemTotal: 774856 kB
MemFree: 22952 kB
Buffers: 3656 kB
Cached: 127600 kB
SwapCached: 6308 kB
Active: 626132 kB
Inactive: 75452 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 774856 kB
LowFree: 22952 kB
SwapTotal: 1116476 kB
SwapFree: 647064 kB
Dirty: 12 kB
Writeback: 0 kB
Mapped: 621524 kB
Slab: 28268 kB
CommitLimit: 1503904 kB
Committed_AS: 1146312 kB
PageTables: 2472 kB
VmallocTotal: 245752 kB
VmallocUsed: 8992 kB
VmallocChunk: 236384 kB


Nothing indicates a lack of memory.
I'm running the following version of python :

Python 2.4.3 (#2, Apr 27 2006, 14:43:58)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)]

Does somebody has an idea about what's happening ?

Many thanks for your time,
Brice
 
D

Dennis Lee Bieber

Nothing indicates a lack of memory.

No? I'd consider a machine with only 23MB free rather heavily used
(especially when it starts with over 700MB).

OTOH, I have no idea what this C-library function seeks to perform,
so my comment could just be a wild-goose...

--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 
C

Chris Mellon

No? I'd consider a machine with only 23MB free rather heavily used
(especially when it starts with over 700MB).

OTOH, I have no idea what this C-library function seeks to perform,
so my comment could just be a wild-goose...

That's physical ram, note that there's lots of swap space left. What
seems more likely is that the virtual memory space of the process is
being exhausted.
 
D

Dennis Lee Bieber

That's physical ram, note that there's lots of swap space left. What
seems more likely is that the virtual memory space of the process is
being exhausted.

Call it paranoia, but I tend to get concerned anytime over 75% of my
RAM is in use <G>* (Granted, I've got a 2GB RAM, and another 1.5GB of
swap... at this moment in time I have a commit charge of only 400MB)
Only time I see that much RAM allocated tends to be running Photoshop
with something like 10 digicam images open (Hmmm, given how digital has
taken over the photography world, does one still need to use "digi" in
the reference)



* I still recall when my campus mainframe was equipped with a pair of
300MB "washing machine" drive -- primarily to be used as swap space for
a processor with 1MB of RAM; and handling up to 50 text terminals!
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top