[Python-bugs-list] [Bug #110835] Find out size of primitive object (PR#214)
noreply@sourceforge.net
noreply@sourceforge.net
Sun, 6 Aug 2000 14:42:36 -0700
Bug #110835, was updated on 2000-Aug-01 14:13
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 5
Summary: Find out size of primitive object (PR#214)
Details: Jitterbug-Id: 214
Submitted-By: loewis@informatik.hu-berlin.de
Date: Fri, 25 Feb 2000 14:28:33 -0500 (EST)
Version: 1.5.2
OS: Solaris
This is a feature request made on python-help. If you want to estimate
how much memory your application uses, you currently have to count the bytes
manually. If there was a builtin function (say, sys.sizeof), counting would
be much easier. It would be documented as
sizeof(object) -> integer
Return the number of bytes that an object uses internally. This only counts
the number of bytes used by the object itself, not those of any of its
attributes.
Ie. sys.sizeof(0) would give 12 on my system, the size of a dictionary would
count the dictentries, but the size of an instanceobject would not count the
the size of the __dict__ attribute.
====================================================================
Audit trail:
Tue Mar 07 14:42:18 2000 guido changed notes
Tue Mar 07 14:42:18 2000 guido moved from incoming to request
Follow-Ups:
Date: 2000-Aug-01 14:14
By: none
Comment:
Interesting idea.
Is this what we need?
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110835&group_id=5470