| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
(MemoryError).
|
|
|
|
| |
(MemoryError).
|
| |
|
|
|
|
| |
is negative
|
| |
|
|
|
|
|
| |
Replace strdup() with _PyMem_RawStrdup() or _PyMem_Strdup(), depending if the
GIL is held or not.
|
|
|
|
| |
cElementTree uses the same approach since at least Python 2.6
|
|
|
|
| |
value (void)
|
| |
|
| |
|
|
|
|
|
| |
Modules/posixmodule.c: In function 'posix_sendfile':
Modules/posixmodule.c:7700: warning: ISO C90 forbids mixed declarations and code
|
|
|
|
|
| |
Replace malloc() with PyMem_Malloc() when the GIL is held, or with
PyMem_RawMalloc() otherwise.
|
|
|
|
|
|
|
| |
* Replace malloc() with PyMem_RawMalloc()
* Replace PyMem_Malloc() with PyMem_RawMalloc() where the GIL is not held.
* _Py_char2wchar() now returns a buffer allocated by PyMem_RawMalloc(), instead
of PyMem_Malloc()
|
| |
|
|
|
|
|
|
|
|
|
|
| |
blocks.
* Add comment explaining the endpoint checks
* Only do the checks in a debug build
* Simplify newblock() to only require a length argument
and leave the link updates to the calling code.
* Also add comment for the freelisting logic.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add new enum:
* PyMemAllocatorDomain
Add new structures:
* PyMemAllocator
* PyObjectArenaAllocator
Add new functions:
* PyMem_RawMalloc(), PyMem_RawRealloc(), PyMem_RawFree()
* PyMem_GetAllocator(), PyMem_SetAllocator()
* PyObject_GetArenaAllocator(), PyObject_SetArenaAllocator()
* PyMem_SetupDebugHooks()
Changes:
* PyMem_Malloc()/PyObject_Realloc() now always call malloc()/realloc(), instead
of calling PyObject_Malloc()/PyObject_Realloc() in debug mode.
* PyObject_Malloc()/PyObject_Realloc() now falls back to
PyMem_Malloc()/PyMem_Realloc() for allocations larger than 512 bytes.
* Redesign debug checks on memory block allocators as hooks, instead of using C
macros
|
|/ |
|
|
|
|
| |
to be consistent with practices in other modules.
|
|
|
|
|
| |
Hoist conditional expression out of the loop.
Use rightblock as the guard instead of checking for NULL.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The division and modulo calculation in deque_item() can be compiled
to fast bitwise operations when the BLOCKLEN is a power of two.
Timing before:
~/cpython $ py -m timeit -r7 -s 'from collections import deque' -s 'd=deque(range(10))' 'd[5]'
10000000 loops, best of 7: 0.0627 usec per loop
Timing after:
~/cpython $ py -m timeit -r7 -s 'from collections import deque' -s 'd=deque(range(10))' 'd[5]'
10000000 loops, best of 7: 0.0581 usec per loop
|
|\
| |
| |
| |
| | |
handler when the function is called twice, so faulthandler.unregister()
restores correctly the original signal handler.
|
| |
| |
| |
| |
| | |
when the function is called twice, so faulthandler.unregister() restores
correctly the original signal handler.
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/
| |
| | |
segfault inside the _pickle C extension.
|
| |
| |
| |
| | |
segfault inside the _pickle C extension.
|
| |
| |
| |
| | |
u can be NULL, use XDECREF
|
| |
| |
| |
| |
| | |
CID 983309 (#1 of 1): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable unicode_str going out of scope leaks the storage it points to.
|
| |
| |
| |
| |
| | |
CID 1040362 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
var_deref_op: Dereferencing null pointer _py_decref_tmp.
|
| |
| |
| |
| |
| | |
CID 1040367 (#1 of 1): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable u going out of scope leaks the storage it points to.
|
| | |
|
| |
| |
| |
| |
| |
| | |
On AIX, the C function mktime() alwaysd sets tm_wday, even on error. So tm_wday
cannot be used as a sentinel to detect an error, we can only check if the
result is (time_t)-1.
|
|\ \
| |/
| |
| | |
time.strtime("%Y") returned "2345" when formatting year 12345.
|
| |
| |
| |
| | |
time.strtime("%Y") returned "2345" when formatting year 12345.
|
| | |
|
|\ \
| |/
| |
| |
| |
| | |
the input string in longer than 2 gigabytes, and
ssl.SSLContext.load_cert_chain() raises a ValueError if the password is longer
than 2 gigabytes. The ssl module does not support partial write.
|
| |
| |
| |
| |
| |
| | |
string in longer than 2 gigabytes, and ssl.SSLContext.load_cert_chain() raises
a ValueError if the password is longer than 2 gigabytes. The ssl module does
not support partial write.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
of socket.socket objects now truncate the input buffer to INT_MAX bytes on
Windows to avoid an integer overflow.
(sendall() still send the whole buffer.)
|
| | |
|
| |
| |
| |
| | |
on Windows x64
|
| | |
|
|\ \ |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
constants instead
of arbitrary looking numbers.
|
| |\ \
| | |/ |
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Clarified comment on the impact of BLOCKLEN on deque_index
(with a power-of-two, the division and modulo
computations are done with a right-shift and bitwise-and).
* Clarified comment on the overflow check to note that
it is general and not just applicable the 64-bit builds.
* In deque._rotate(), the "deque->" indirections are
factored-out of the loop (loop invariant code motion),
leaving the code cleaner looking and slightly faster.
* In deque._rotate(), replaced the memcpy() with an
equivalent loop. That saved the memcpy setup time
and allowed the pointers to move in their natural
leftward and rightward directions.
See comparative timings at: http://pastebin.com/p0RJnT5N
|