473,800 Members | 2,516 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Memory profiling

I have a fairly large program that uses a number of third-party
modules. After a few hours the program eats several 100M of memory.

Does Python provide any tools that can help in determining where the
memory is used? Ideally, I would like to see a tool that can list all
objects by memory-usage, but any tool that can return the number of
bytes used by an arbitrary object would be of great help. Even
something that could find all allocated dicts&lists and return their
size+name would help.

Regards,
--
Rune Frøysa
University of Oslo, Norway
Jul 18 '05 #1
1 2500
Rune Froysa <ru*********@us it.uio.no> writes:
Does Python provide any tools that can help in determining where the
memory is used?
*Memory*, no. Especially in a debug build, there are tools for
finding out where the objects are, though.
Ideally, I would like to see a tool that can list all objects by
memory-usage, but any tool that can return the number of bytes used
by an arbitrary object would be of great help. Even something that
could find all allocated dicts&lists and return their size+name
would help.


In a debug build, look at sys.getobjects. In a recent release build,
look at gc.get_objects.

Cheers,
mwh

--
<arigo> something happens, what I'm not exactly sure.
-- PyPy debugging fun
Jul 18 '05 #2

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

Similar topics

2
2934
by: barkha shah | last post by:
Hi , Can any one please suggest me the memory Leak detecting tool in Visual Studio.Net 2003 Release version Framework. Can I use Numega Bounds checker for this. Thanks and Regards. barkha
3
2431
by: Peter Olcott | last post by:
What can anyone: (1) Tell Me about (2) Provide Links to (3) Recommend Books Pertaining to Memory Performance Optimization? The main thing that I am looking for is rules-of-thumb that maximize the execution speed of time critical applications.
14
1787
by: Don HO | last post by:
Hi, We have found a memory leak on a php server after executing a php/mysql application. The configuration is php 4.3.1 + mysql on windows server 2000 with IIS. Does the memory leak come from the php application itself (ie. a bug on the php developed scripts)? If not, where could be the problem?
5
2175
by: Mike S | last post by:
I'm working on a .NET application that was under development by a previous developer, who is no longer working with the company. The program basically extracts records from a source database and outputs them in an XML document, mapping the source records into a third-party XML schema. The mapping process is handled by C# code that was auto-generated by Altova MapForce -- code was added to extract a subset of records from the source...
7
4695
by: toton | last post by:
Hi, I have a STL vector of of characters and the character class has a Boost array of points. The things are vector<Characterchars; and class Character{ private: array<Point,Npoints; }; Now are the memory layout is contiguous? i.e all the character resides side by side just like array, and all Points side by side insede the
2
1860
by: chris.ritchie | last post by:
My question is very basic, but I can't find any material on it. Compare these: string x; // only used within the following loop for (int y = 0; y < 10; y++){ x = toString(y); use(x); } ---
0
2591
by: L'eau Prosper Research | last post by:
Press Release: L'eau Prosper Research (Website: http://www.leauprosper.com) releases new TradeStation 8 Add-on - L'eau Prosper Market Manipulation Profiling Tools Set. L'eau Prosper Market Manipulation Profiling Tools Set is a set of advanced tools that help Serious Traders analyze the market direction, market manipulative behavior and predicting the change of trend.
0
2355
by: L'eau Prosper Research | last post by:
NEW TradeStation 8 Add-on - L'eau Prosper Market Manipulation Profiling Tools Set By L'eau Prosper Research Press Release: L'eau Prosper Research (Website: http://www.leauprosper.com) releases new TradeStation 8 Add-on - L'eau Prosper Market Manipulation Profiling Tools Set. L'eau Prosper Market Manipulation Profiling Tools Set is a set of
2
2721
by: Jaroslaw Szczepankiewicz | last post by:
Hi is it possible to profile memory usage of single function, ideally it would be to see stack tree with memory info of each function (current usage of memory before and after executing function), do you know any tool that allows that function? Thanks in advance.
0
176
by: David | last post by:
On Tue, May 6, 2008 at 4:21 PM, Banibrata Dutta <banibrata.dutta@gmail.comwrote: Thanks for your post. I didn't think of Googling for "python memory profiling". That search returns a lot of results. I'll check a few of those results and post to the list if I find something good. David.
0
9695
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
9555
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10514
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
10287
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
9099
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7588
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
6826
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();...
1
4156
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3770
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.