473,396 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 5070
"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 intelligence/education above average - 2) I am very...
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 entails the use of Perl (a bit of a misnomer as it...
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 management in python 2.5...
206
by: WaterWalk | last post by:
I've just read an article "Building Robust System" by Gerald Jay Sussman. The article is here: http://swiss.csail.mit.edu/classes/symbolic/spring07/readings/robust-systems.pdf In it there is a...
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 company) use. You Used Python to Write WHAT?...
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 problem became the focus we are paying attention...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.