473,387 Members | 1,766 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,387 software developers and data experts.

Memory visualization

Icon is a language that share some similarities with Python:
http://www.cs.arizona.edu/icon/

During the execution of a Icon script there are ways to visualize the
memory:
http://www.cs.arizona.edu/icon/progv...mon/memmon.htm

Related pages:
http://www.cs.arizona.edu/icon/progv...p/workshop.htm
http://www.cs.arizona.edu/icon/progvis/progvis.htm

I'd like to know if for Python there is a similar program to
dynamically see the memory in a similar way.
If such tool doesn't exist yet, I'd like to know if it may be diffifult
to create it.

Bye,
bearophile

Mar 14 '06 #1
3 2824
[bearophile]
During the execution of a Icon script there are ways to visualize the
memory:
http://www.cs.arizona.edu/icon/progv...mon/memmon.htm . . . I'd like to know if for Python there is a similar program to
dynamically see the memory in a similar way.
If such tool doesn't exist yet, I'd like to know if it may be diffifult
to create it.


Yes, it would be difficult.

Python gets chunks of memory from the o/s -- those may not be
contiguous. Python has some internal object reuse tricks such that a
chuck of memory may be tied-up in a free-list though no active object
is alive. Extensions can call their own malloc and free so it would be
difficult to ensure that you catch those. Some objects like lists and
dicts have chunks of partially used memory that allow room for growth.

That being said, there is likely some interesting things that could be
done in C by exploiting tp_traverse and by hacking Python's internal
object allocator.
Raymond

Mar 14 '06 #2
[be************@lycos.com]
Icon is a language that share some similarities with Python:
http://www.cs.arizona.edu/icon/

During the execution of a Icon script there are ways to visualize the
memory:
http://www.cs.arizona.edu/icon/progv...mon/memmon.htm

Related pages:
http://www.cs.arizona.edu/icon/progv...p/workshop.htm
http://www.cs.arizona.edu/icon/progvis/progvis.htm

I'd like to know if for Python there is a similar program to
dynamically see the memory in a similar way.
If such tool doesn't exist yet, I'd like to know if it may be diffifult
to create it.


Long-time Icon developer Clinton Jeffery gave a presentation on this
topic at PyCon 2005:

Profiling and Visualizing Python Program Behavior
<http://www.python.org/pycon/2005/papers/49/PyCon2005ProfilingandVisualizing.pdf>

It was a delight for me to meet him there, since I was an Icon
programmer before Python existed ;-) He had some impressive
preliminary CPython visualization results, which required (a) a lot of
work, and (b) some modest changes to the core interpreter. Alas, I
haven't heard more about it since then. If I were you, I'd ask Dr.
Jeffery what became of that project.
Mar 15 '06 #3
In message <ma***************************************@python. org>, Tim
Peters <ti********@gmail.com> writes
[be************@lycos.com]
I'd like to know if for Python there is a similar program to
dynamically see the memory in a similar way.
If such tool doesn't exist yet, I'd like to know if it may be diffifult
to create it.


One already exists: Python Memory Validator.

Software Verification provide software tools for Python on the Windows
platform. Software Verification have two commercial products for
coverage and performance profiling and three beta products for flow
tracing, memory analysis and thread deadlock monitoring.

http://www.softwareverify.com

Software Verification run with Python 2.2 upwards - no need to modify
the python source or binary.

Stephen
--
Stephen Kellett
Object Media Limited http://www.objmedia.demon.co.uk/software.html
Computer Consultancy, Software Development
Windows C++, Java, Assembler, Performance Analysis, Troubleshooting
Mar 15 '06 #4

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

Similar topics

3
by: Kelvin Klein | last post by:
Is there a visualization tool for C program out there? Is there a visualization tool for the language of one of the crossposted newsgroup out there? I am a refuge from comp.lang.c, kicked out...
8
by: rbt | last post by:
Would a Python process consume more memory on a PC with lots of memory? For example, say I have the same Python script running on two WinXP computers that both have Python 2.4.0. One computer has...
1
by: Noname | last post by:
Hi All I am working for a EE Department. We are in the process of developing some application that requires 3D visualization and other display routines. Can anyone clarify that if thats possible....
2
by: Larry | last post by:
I am wondering if anyone has any thoughts on the following issues once Ajax is incorporated into a page: Now that we have this Ajax stuff, users have the potential to not leave a page for a long...
11
by: Fie Pye | last post by:
Hallo I would like to have a high class open source tools for scientific computing and powerful 2D and 3D data visualisation. Therefore I chosepython, numpy and scipy as a base. Now I am in...
9
by: Xah Lee | last post by:
REQUIREMENTS FOR A VISUALIZATION SOFTWARE SYSTEM FOR 2010 Xah Lee, 2007-03-16 In this essay, i give a list of requirements that i think is necessary for a software system for creating...
0
by: tavares | last post by:
(Our apologies for cross-posting. We appreciate if you kindly distribute this information by your co- workers and colleagues.) ...
0
by: abir | last post by:
I have a big dynamic sparse directed graph implementation where new nodes are added & old nodes are removed. Usually, at any moment of time the number of nodes in the graph and the number of edges...
0
by: JDeats | last post by:
Looking to build an desktop application for a client using WPF/ Silverlight 2.0 or Adobe Flex 2.0 and because of my ability to use C# and the integration requirements, the WPF solution would be the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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,...

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.