473,506 Members | 16,994 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Memory allocation problem with python 2.4.3

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

Apr 9 '07 #1
1 1667
On 4/9/07, Dennis Lee Bieber <wl*****@ix.netcom.comwrote:
On 9 Apr 2007 04:12:59 -0700, "Brice-Olivier Demory"
<bo******@gmail.comdeclaimed the following in comp.lang.python:

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...
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.
Apr 9 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2702
by: Moosebumps | last post by:
When I have time, I am planning to evaluate Python for console game development (on Playstation 2, GameCube, and Xbox). Does anyone have any experience with this? Pretty much the only resource...
6
3830
by: benevilent | last post by:
Hey, I'm trying to debug the memory allocation in an embedded use of the Python interpreter. The longer I leave my program running the more memory it consumes. The total number of objects in...
1
1603
by: Simon Wittber | last post by:
I have written some software which proxy's SQL Server database services across a network. It uses Pyro, without multiuthreading. It creates and closes a new connection and cursor object for each...
9
2461
by: Chris S. | last post by:
Is it possible to determine how much memory is allocated by an arbitrary Python object? There doesn't seem to be anything in the docs about this, but considering that Python manages memory...
10
2213
by: Steven D'Aprano | last post by:
Can somebody help me please? I've spent a fruitless hour googling with no luck. I'm discussing memory allocation techniques with somebody, and I'm trying to find a quote from -- I think -- Tim...
13
4458
by: placid | last post by:
Hi All, Just wondering when i run the following code; for i in range(1000000): print i the memory usage of Python spikes and when the range(..) block finishes execution the memory usage...
17
8452
by: frederic.pica | last post by:
Greets, I've some troubles getting my memory freed by python, how can I force it to release the memory ? I've tried del and gc.collect() with no success. Here is a code sample, parsing an XML...
5
3334
by: vishnu | last post by:
Hi there, I am embedding python 2.5 on embedded system running on RTOS where I had strict memory constraints. As python is a huge malloc intensive application, I observed huge memory...
13
2834
by: Ilias Lazaridis | last post by:
How to detect memory leaks of python programms, which run in an environment like this: * Suse Linux 9.3 * Apache * mod_python The problem occoured after some updates on the infrastructure....
0
839
by: Calvin Spealman | last post by:
On Jun 17, 2008, at 2:34 PM, Eduardo Henrique Tessarioli wrote: The runtime itself isn't as light as, say, the C stdlib. Now, there are a lot of shared libraries here, so you should measure...
0
7218
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7103
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
5614
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5035
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4701
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3177
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1532
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
755
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
409
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.