Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 committed Sep 12, 2024
1 parent 86efce6 commit 3150eab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Doc/c-api/memory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ belonging to a given domain for only the purposes hinted by that domain.
returned by :c:func:`PyMem_RawMalloc` for allocating Python objects or the memory
returned by :c:func:`PyObject_Malloc` for allocating memory for buffers.
However, in the free-threaded build, Python objects must be allocated through :c:func:`PyObject_Malloc`.
Non-Python objects must not be allocated this function, for example,
it is currently acceptable to allocate buffers(non-Python objects) through :c:func:`PyObject_Malloc`;
that will no longer be allowed and buffers should instead be allocated through :c:func:`PyMem_Malloc`, :c:func:`PyMem_RawMalloc`, or :c:func:`malloc`..
Non-Python objects must not be allocated this function, for example, it is currently acceptable to
allocate buffers(non-Python objects) through :c:func:`PyObject_Malloc`; that will no longer be allowed
and buffers should instead be allocated through :c:func:`PyMem_Malloc`, :c:func:`PyMem_RawMalloc`, or :c:func:`malloc`..

The three allocation domains are:

Expand Down

0 comments on commit 3150eab

Please sign in to comment.