469,609 Members | 1,092 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

baffling memory usage

Hi I'm having an issue that is probably obvious to somebody here but its
baffling me..

I'm using python (2.5.1) on an embedded linux sytem system (kernel
2.6.19 I think) with only 32MB memory (for an art project).

My python code runs nicely when launched manually from a login shell, ps
shows its using 11MB or so of memory.

However, when I try to launch the same code from a startup script, it
uses over 22MB and the system grinds to a halt. Specifically its calling
a speech synthesis program (flite) from the os.system() function, which
requires 4-5MB, and this doesnt work from the startup script.

Why would python use twice as much memory when launched from a startup
script? Could it be related to the use of the os.system() function?

Thanks in advance,

Tim

Oct 16 '08 #1
1 1148
In message <ma**************************************@python.o rg>, Tim
Redfern wrote:
My python code runs nicely when launched manually from a login shell, ps
shows its using 11MB or so of memory.

However, when I try to launch the same code from a startup script, it
uses over 22MB and the system grinds to a halt. Specifically its calling
a speech synthesis program (flite) from the os.system() function, which
requires 4-5MB, and this doesnt work from the startup script.
One useful thing to look at might be the /proc/<pid>/maps file (where <pid>
is the process ID). This shows you the memory regions, shared libraries etc
for the specified process. Might give you a clue as to what's different in
the two situations.
Oct 17 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by rbt | last post: by
2 posts views Thread by Mike Peretz | last post: by
2 posts views Thread by tomvr | last post: by
2 posts views Thread by Jarvis | last post: by
20 posts views Thread by Philip Carnstam | last post: by
1 post views Thread by Jean-Paul Calderone | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.