Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
revert changes on refs ignored by nitpick_ignore
  • Loading branch information
vstinner committed Jul 27, 2023
commit 511d8fbe5caf76e51d2dccf6b361458ff8cc2460
4 changes: 2 additions & 2 deletions Doc/c-api/memory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ API functions listed in this document.
single: free()

To avoid memory corruption, extension writers should never try to operate on
Python objects with the functions exported by the C library: :c:func:`!malloc`,
Python objects with the functions exported by the C library: :c:func:`malloc`,
:c:func:`calloc`, :c:func:`realloc` and :c:func:`free`. This will result in mixed
calls between the C allocator and the Python memory manager with fatal
consequences, because they implement different algorithms and operate on
Expand Down Expand Up @@ -135,7 +135,7 @@ functions are thread-safe, the :term:`GIL <global interpreter lock>` does not
need to be held.

The :ref:`default raw memory allocator <default-memory-allocators>` uses
the following functions: :c:func:`!malloc`, :c:func:`!calloc`, :c:func:`!realloc`
the following functions: :c:func:`malloc`, :c:func:`calloc`, :c:func:`realloc`
and :c:func:`!free`; call ``malloc(1)`` (or ``calloc(1, 1)``) when requesting
zero bytes.

Expand Down