[New-bugs-announce] [issue4800] little inaccuracy in Py_ssize_t explanation

Kandalintsev Alexandre report at bugs.python.org
Thu Jan 1 11:32:35 CET 2009


New submission from Kandalintsev Alexandre <bug_hunter at messir.net>:

Documentation says that

========
There’s no chance that the reference count can overflow; at least as many bits 
are used to hold the reference count as there are distinct memory locations in 
virtual memory (assuming sizeof(Py_ssize_t) >= sizeof(void*)). Thus, the 
reference count increment is a simple operation.
========

But Py_ssize_t is a signed type so in case of sizeof(Py_ssize_t) == sizeof
(void*)) it can only reference a half of memmory :). But because any python 
object consumes much more than 2bytes this is not a problem.

----------
assignee: georg.brandl
components: Documentation
messages: 78695
nosy: exe, georg.brandl
severity: normal
status: open
title: little inaccuracy in Py_ssize_t explanation
versions: Python 3.0, Python 3.1

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4800>
_______________________________________


More information about the New-bugs-announce mailing list