473,769 Members | 2,599 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2852
[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/PyCon2005Profil ingandVisualizi ng.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************ *************** ************@py thon.org>, Tim
Peters <ti********@gma il.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
5264
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 without being told where to go. I am sure one of the kind souls would be glad to help. The original message below was written for C but I am now going to look at any visualisation tool. What I mean is, anything to visualize C programs or pictorially...
8
3674
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 256 MB of Ram while the other has 2 GB of Ram. On the machine with less Ram, the process takes about 1 MB of Ram. On the machine with more Ram, it uses 9 MB of Ram. Is this normal and expected behavior?
1
377
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. Thanks Regards
2
4171
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 time. My knowledge of browser memory handling is limited, but I spoke with a Microsoft engineer who told me that IE has a very naive mark and sweep GC algorithm, which gets invoked when a page gets reloaded. If the GC is not invoked until a...
11
3650
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 search for a visualisation tool. I tried matplotlib and py_opendx with OpenDx. OpenDx seems to me very good but the project py_opendx looks like closed. After py_opendx instalation and subsequent testing I got an error that needs discussion with author...
9
3042
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 scientific visualization for the next decade (2007-2017). (for a HTML version with images, please see http://xahlee.org/3d/viz.html )
0
2031
by: tavares | last post by:
(Our apologies for cross-posting. We appreciate if you kindly distribute this information by your co- workers and colleagues.) *************************************************************************** Symposium “Image Processing and Data Visualization” 2nd South-East European Conference on Computational Mechanics (SEECCM 2009) Island of Rhodes, Greece, 22-24 June 2009
0
1341
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 are approximately constant. The nodes and associated data are stored in a quasi-static dynamic memory (quasi_buffer) which reserves a minimum memory, but on demand can grow upto an user defined maximum memory. The no of nodes in the graph are...
0
1378
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 most cost effective solution, except for the lack of visualization controls. I realize Infragistics and other vendors have products out there that provide for this, but none that I've found are as cost effective as the rich visualization...
0
9589
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10212
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10047
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9863
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7410
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3563
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.