Memory allocation problem with python 2.4.3

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brice-Olivier Demory

    #1

    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_req uest(conn,addr, request) # proc
    the
    request
    File "ccdd.py", line 69, in proc_request
    answer = '1&%s'%(ccd.exe c_function(fct, arg))
    File "/opt/OFXB/lib/python2.4/site-packages/ccdlib.py", line 204, in
    exec_function
    return apply(self.func s[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_tim e(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

  • Chris Mellon

    #2
    Re: Memory allocation problem with python 2.4.3

    On 4/9/07, Dennis Lee Bieber <wlfraed@ix.net com.comwrote:
    On 9 Apr 2007 04:12:59 -0700, "Brice-Olivier Demory"
    <bodemory@gmail .comdeclaimed the following in comp.lang.pytho n:
    >
    >
    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.

    Comment

    Working...