The memory management docs say:

> There is no hard requirement to use the memory returned by the allocation functions belonging to a given domain for only the purposes hinted by that domain (although this is the recommended practice). For example, one could use the memory returned by [PyMem_RawMalloc()](https://docs.python.org/3/c-api/memory.html#c.PyMem_RawMalloc) for allocating Python objects or the memory returned by [PyObject_Malloc()](https://docs.python.org/3/c-api/memory.html#c.PyObject_Malloc) for allocating memory for buffers.

https://docs.python.org/3/c-api/memory.html#allocator-domains

We should update this to account for the free-threaded build, which requires that the "object" domain only used for allocation Python objects (and that Python objects are only allocated using the "object" domain).

See also: https://peps.python.org/pep-0703/#memory-management
Update memory management docs for free-threaded build
This is a GitHub Issue
repo:cpython
owner:python
Title : Update memory management docs for free-threaded build
Issue date:

--- start body ---
The memory management docs say:

> There is no hard requirement to use the memory returned by the allocation functions belonging to a given domain for only the purposes hinted by that domain (although this is the recommended practice). For example, one could use the memory returned by [PyMem_RawMalloc()](https://docs.python.org/3/c-api/memory.html#c.PyMem_RawMalloc) for allocating Python objects or the memory returned by [PyObject_Malloc()](https://docs.python.org/3/c-api/memory.html#c.PyObject_Malloc) for allocating memory for buffers.

https://docs.python.org/3/c-api/memory.html#allocator-domains

We should update this to account for the free-threaded build, which requires that the "object" domain only used for allocation Python objects (and that Python objects are only allocated using the "object" domain).

See also: https://peps.python.org/pep-0703/#memory-management
--- end body ---
