<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Objects/obmalloc.c, branch misc-acks-comment</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<entry>
<title>bpo-38733: PyErr_Occurred() caller must hold the GIL (GH-17080)</title>
<updated>2019-11-07T11:42:07+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2019-11-07T11:42:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=d12d0e7c0fe2b49c40ac4d66365147c619d6c475'/>
<id>d12d0e7c0fe2b49c40ac4d66365147c619d6c475</id>
<content type='text'>
bpo-3605, bpo-38733: Optimize _PyErr_Occurred(): remove "tstate ==
NULL" test.

Py_FatalError() no longer calls PyErr_Occurred() if called without
holding the GIL. So PyErr_Occurred() no longer has to support
tstate==NULL case.

_Py_CheckFunctionResult(): use directly _PyErr_Occurred() to avoid
explicit "!= NULL" test.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
bpo-3605, bpo-38733: Optimize _PyErr_Occurred(): remove "tstate ==
NULL" test.

Py_FatalError() no longer calls PyErr_Occurred() if called without
holding the GIL. So PyErr_Occurred() no longer has to support
tstate==NULL case.

_Py_CheckFunctionResult(): use directly _PyErr_Occurred() to avoid
explicit "!= NULL" test.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36389: Fix _PyBytesWriter in release mode (GH-16624)</title>
<updated>2019-10-07T20:31:42+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2019-10-07T20:31:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=60ec6efd96d95476fe5e38c491491add04f026e5'/>
<id>60ec6efd96d95476fe5e38c491491add04f026e5</id>
<content type='text'>
Fix _PyBytesWriter API when Python is built in release mode with
assertions.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix _PyBytesWriter API when Python is built in release mode with
assertions.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-37732: Fix GCC warning in _PyObject_Malloc() (GH-15333)</title>
<updated>2019-08-20T11:28:02+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-08-20T11:28:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=18f8dcfa10d8a858b152d12a9ad8fa83b7e967f0'/>
<id>18f8dcfa10d8a858b152d12a9ad8fa83b7e967f0</id>
<content type='text'>
pymalloc_alloc() now returns directly the pointer, return NULL on
memory allocation error.

allocate_from_new_pool() already uses NULL as marker for "allocation
failed".</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pymalloc_alloc() now returns directly the pointer, return NULL on
memory allocation error.

allocate_from_new_pool() already uses NULL as marker for "allocation
failed".</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-37681: no_sanitize_thread support from GCC 5.1 (GH-15096)</title>
<updated>2019-08-14T09:50:19+00:00</updated>
<author>
<name>Hai Shi</name>
<email>shihai1992@gmail.com</email>
</author>
<published>2019-08-14T09:50:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=7e479c82218450255572e3f5fa1549dc283901ea'/>
<id>7e479c82218450255572e3f5fa1549dc283901ea</id>
<content type='text'>
Fix the following warning with GCC 4.8.5:
Objects/obmalloc.c: warning: ‘no_sanitize_thread’ attribute directive ignored</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix the following warning with GCC 4.8.5:
Objects/obmalloc.c: warning: ‘no_sanitize_thread’ attribute directive ignored</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-37543: optimize pymalloc (#14674)</title>
<updated>2019-07-17T12:23:57+00:00</updated>
<author>
<name>Inada Naoki</name>
<email>songofacandy@gmail.com</email>
</author>
<published>2019-07-17T12:23:57+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=fb26504d14a08fcd61bb92bb989b6d2b12188535'/>
<id>fb26504d14a08fcd61bb92bb989b6d2b12188535</id>
<content type='text'>
PyObject_Malloc() and PyObject_Free() inlines pymalloc_alloc and
pymalloc_free partially.
But when PGO is not used, compiler don't know where is the hot part
in pymalloc_alloc and pymalloc_free.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PyObject_Malloc() and PyObject_Free() inlines pymalloc_alloc and
pymalloc_free partially.
But when PGO is not used, compiler don't know where is the hot part
in pymalloc_alloc and pymalloc_free.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix compiler warning in new code. (#14690)</title>
<updated>2019-07-10T21:24:01+00:00</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2019-07-10T21:24:01+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=b64c2c66e5cfe6d138b342ee58ee3b13a8d7ef16'/>
<id>b64c2c66e5cfe6d138b342ee58ee3b13a8d7ef16</id>
<content type='text'>
uintptr_t is an integer type, and can't be compared to NULL directly.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
uintptr_t is an integer type, and can't be compared to NULL directly.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-37537: Compute allocated blocks in _Py_GetAllocatedBlocks() (#14680)</title>
<updated>2019-07-10T19:04:16+00:00</updated>
<author>
<name>Neil Schemenauer</name>
<email>nas-github@arctrix.com</email>
</author>
<published>2019-07-10T19:04:16+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=5d25f2b70351fc6a56ce5513ccf5f58556c18837'/>
<id>5d25f2b70351fc6a56ce5513ccf5f58556c18837</id>
<content type='text'>
Keeping an account of allocated blocks slows down _PyObject_Malloc()
and _PyObject_Free() by a measureable amount.  Have
_Py_GetAllocatedBlocks() iterate over the arenas to sum up the
allocated blocks for pymalloc.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Keeping an account of allocated blocks slows down _PyObject_Malloc()
and _PyObject_Free() by a measureable amount.  Have
_Py_GetAllocatedBlocks() iterate over the arenas to sum up the
allocated blocks for pymalloc.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-37257:  obmalloc:  stop simple arena thrashing (#14039)</title>
<updated>2019-06-13T03:41:03+00:00</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2019-06-13T03:41:03+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=d1c85a27ea9fe70163cad3443d5e534d94f08284'/>
<id>d1c85a27ea9fe70163cad3443d5e534d94f08284</id>
<content type='text'>
GH-14039:  allow (no more than) one wholly empty arena on the usable_arenas list.

This prevents thrashing in some easily-provoked simple cases that could end up creating and destroying an arena on each loop iteration in client code.   Intuitively, if the only arena on the list becomes empty, it makes scant sense to give it back to the system unless we know we'll never need another free pool again before another arena frees a pool.  If the latter obtains, then - yes - this will "waste" an arena.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GH-14039:  allow (no more than) one wholly empty arena on the usable_arenas list.

This prevents thrashing in some easily-provoked simple cases that could end up creating and destroying an arena on each loop iteration in client code.   Intuitively, if the only arena on the list becomes empty, it makes scant sense to give it back to the system unless we know we'll never need another free pool again before another arena frees a pool.  If the latter obtains, then - yes - this will "waste" an arena.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-37029:  keep usable_arenas in sorted order without searching (#13612)</title>
<updated>2019-06-01T02:16:04+00:00</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2019-06-01T02:16:04+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=1c263e39c4ed28225a7dc8ca1f24953225ac48ca'/>
<id>1c263e39c4ed28225a7dc8ca1f24953225ac48ca</id>
<content type='text'>
This adds a vector of "search fingers" so that usable_arenas can be kept in sorted order (by number of free pools) via constant-time operations instead of linear search.

This should reduce worst-case time for reclaiming a great many objects from O(A**2) to O(A), where A is the number of arenas.  See bpo-37029.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds a vector of "search fingers" so that usable_arenas can be kept in sorted order (by number of free pools) via constant-time operations instead of linear search.

This should reduce worst-case time for reclaiming a great many objects from O(A**2) to O(A), where A is the number of arenas.  See bpo-37029.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36763: Add PyMemAllocatorName (GH-13387)</title>
<updated>2019-05-17T13:20:52+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-05-17T13:20:52+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=b16b4e45923f4e4dfd8e970ae4e6a934faf73b79'/>
<id>b16b4e45923f4e4dfd8e970ae4e6a934faf73b79</id>
<content type='text'>
* Add PyMemAllocatorName enum
* _PyPreConfig.allocator type becomes PyMemAllocatorName, instead of
  char*
* Remove _PyPreConfig_Clear()
* Add _PyMem_GetAllocatorName()
* Rename _PyMem_GetAllocatorsName() to
  _PyMem_GetCurrentAllocatorName()
* Remove _PyPreConfig_SetAllocator(): just call
  _PyMem_SetupAllocators() directly, we don't have do reallocate the
  configuration with the new allocator anymore!
* _PyPreConfig_Write() parameter becomes const, as it should be in
  the first place!</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add PyMemAllocatorName enum
* _PyPreConfig.allocator type becomes PyMemAllocatorName, instead of
  char*
* Remove _PyPreConfig_Clear()
* Add _PyMem_GetAllocatorName()
* Rename _PyMem_GetAllocatorsName() to
  _PyMem_GetCurrentAllocatorName()
* Remove _PyPreConfig_SetAllocator(): just call
  _PyMem_SetupAllocators() directly, we don't have do reallocate the
  configuration with the new allocator anymore!
* _PyPreConfig_Write() parameter becomes const, as it should be in
  the first place!</pre>
</div>
</content>
</entry>
</feed>
