Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find out size of primitive object (PR#214) #32836

Closed
anonymous mannequin opened this issue Aug 1, 2000 · 5 comments
Closed

Find out size of primitive object (PR#214) #32836

anonymous mannequin opened this issue Aug 1, 2000 · 5 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@anonymous
Copy link
Mannequin

anonymous mannequin commented Aug 1, 2000

BPO 210835
Nosy @malemburg

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2000-09-15.18:56:10.000>
created_at = <Date 2000-08-01.21:13:51.000>
labels = ['interpreter-core', 'type-feature']
title = 'Find out size of primitive object (PR#214)'
updated_at = <Date 2000-09-15.18:56:10.000>
user = 'https://bugs.python.org/anonymous'

bugs.python.org fields:

activity = <Date 2000-09-15.18:56:10.000>
actor = 'jhylton'
assignee = 'jhylton'
closed = True
closed_date = None
closer = None
components = ['Interpreter Core']
creation = <Date 2000-08-01.21:13:51.000>
creator = 'anonymous'
dependencies = []
files = []
hgrepos = []
issue_num = 210835
keywords = []
message_count = 5.0
messages = ['759', '760', '761', '762', '763']
nosy_count = 3.0
nosy_names = ['lemburg', 'nobody', 'jhylton']
pr_nums = []
priority = 'normal'
resolution = 'later'
stage = None
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue210835'
versions = []

@nobody
Copy link
Mannequin

nobody mannequin commented Aug 1, 2000

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

@anonymous anonymous mannequin closed this as completed Aug 1, 2000
@anonymous anonymous mannequin assigned jhylton Aug 1, 2000
@anonymous anonymous mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement labels Aug 1, 2000
@anonymous anonymous mannequin closed this as completed Aug 1, 2000
@anonymous anonymous mannequin assigned jhylton Aug 1, 2000
@anonymous anonymous mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement labels Aug 1, 2000
@nobody
Copy link
Mannequin

nobody mannequin commented Aug 1, 2000

Interesting idea.
Is this what we need?

@jhylton
Copy link
Mannequin

jhylton mannequin commented Sep 7, 2000

Please do triage on this bug.

@malemburg
Copy link
Member

See mxTools at http://starship.python.net/~lemburg/ for an example of how
to implement a sizeof() function.

The problem with this approach is that it only counts the size of the
object struct itself and doesn't account for any external storage
which may have been allocated by the object (e.g. Unicode objects
and dictionaries use such external resources).

@jhylton
Copy link
Mannequin

jhylton mannequin commented Sep 15, 2000

entere in PEP-42

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant