472,344 Members | 1,564 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,344 software developers and data experts.

Python memory management

Hi!

I will be presenting Python to an audience of game developers, mostly
C/C++ programmers. In my presentation I will talk about using python and
C/C++ extension instead of pure C/C++ to write commercial games and
content creation tools.

In a number of times I have presented these ideas to this same kind of
audience and they were received with cold skepticism, despite the fact
that some, including me, are already doing this with quite some success.

I've noticed that, from all their concerns, the most difficult to tackle
(for me, at least) is memory management.

Currently, the most popular platform for game applications are videogame
consoles. Memory on these special purpose machines are a premium
resource and one should used it judiciously. Python's RTE footprint and
memory fragmentation issues make it a hard sell for game programmers
(many tend to prefer LUA).

I would like to address this topic in my presentation, showing the real
picture about python memory habits and how to gain control over memory
management when using Python. So, I'm looking the references on the
subject. Also, I would like to hear comments from those with experience
in tweaking python's memory management.

Cheers,
Marcelo A. Camelo, M. Eng. - Project Leader
ESSS - Engineering Simulation and Scientific Software

E-mail: ca****@esss.com.br
Phone: +55-48-334-8922

Jul 18 '05 #1
3 4958
"Marcelo A. Camelo" <ca****@esss.com.br> writes:
Currently, the most popular platform for game applications are videogame
consoles. Memory on these special purpose machines are a premium
resource and one should used it judiciously. Python's RTE footprint and
memory fragmentation issues make it a hard sell for game programmers
(many tend to prefer LUA).


Um, *I*, at least, would say they have a point. I love Python and
think it has many, many virtues, but being miserly with RAM is not one
of them (at least, for the current implementation).

If you're on a real PC, things are very different, of course.

Cheers,
mwh

--
Darned confusing, unless you have that magic ingredient coffee, of
which I can pay you Tuesday for a couple pounds of extra-special
grind today. -- John Mitchell, 11 Jan 1999
Jul 18 '05 #2
Quoth Marcelo A. Camelo:
[...]
Yes, I will be saying that. But, if I can't change the way Python
behaves, at least I want a way to diagnose what he is doing. I've found
some references about Pymalloc, now the default Python memory manager,
and how it can report statistics about memory usage, but the
documentation is a bit light on details. Any pointer to some resources
on the subject? [...]


There's Misc/SpecialBuilds.txt in the source distribution, which
documents several build-time options which could be used for such
investigations. (It assumes some familiarity with the internals.)

--
Steven Taschuk st******@telusplanet.net
"I may be wrong but I'm positive." -- _Friday_, Robert A. Heinlein

Jul 18 '05 #3
In article <ma**********************************@python.org >,
Marcelo A. Camelo <ca****@esss.com.br> wrote:

I've noticed that, from all their concerns, the most difficult to tackle
(for me, at least) is memory management.

Currently, the most popular platform for game applications are videogame
consoles. Memory on these special purpose machines are a premium
resource and one should used it judiciously. Python's RTE footprint and
memory fragmentation issues make it a hard sell for game programmers
(many tend to prefer LUA).


As Michael Hudson said, those are real issues. Nevertheless, the
increasing power of game consoles renders the first issue less
important, and PyMalloc (standard in Python 2.3) does much to alleviate
the second issue.
--
Aahz (aa**@pythoncraft.com) <*> http://www.pythoncraft.com/

This is Python. We don't care much about theory, except where it intersects
with useful practice. --Aahz
Jul 18 '05 #4

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

Similar topics

137
by: Philippe C. Martin | last post by:
I apologize in advance for launching this post but I might get enlightment somehow (PS: I am _very_ agnostic ;-). - 1) I do not consider my...
17
by: hanumizzle | last post by:
I have used Perl for a long time, but I am something of an experimental person and mean to try something new. Most of my 'work' with Vector Linux...
4
by: cesar.ortiz | last post by:
Hi, I am starting to have a look to a python program that does not free memory (I am using python 2.4.3). As I have read about a new memory...
206
by: WaterWalk | last post by:
I've just read an article "Building Robust System" by Gerald Jay Sussman. The article is here:...
62
by: estherschindler | last post by:
This is part of a series examining the strengths and weaknesses of various scripting languages, with particular attention to enterprise (read: big...
3
by: Hank | last post by:
Steve Holden wrote: Hi, Steve, This not simply a pathological condition. My people are keeping trying many ways to have job done, and the memory...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...

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.