Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
eendebakpt committed May 18, 2022
1 parent 8777073 commit 5bc581f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/source/reference/c-api/data_memory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ functions may change during the lifetime of the process, each ``ndarray``
carries with it the functions used at the time of its instantiation, and these
will be used to reallocate or free the data memory of the instance.

For details see: :ref:`NEP 49 — Data allocation strategies`.

.. c:type:: PyDataMem_Handler
A struct to hold function pointers used to manipulate memory
Expand Down Expand Up @@ -87,6 +89,8 @@ will be used to reallocate or free the data memory of the instance.
return ``NULL`` if an error has occurred. We wrap the user-provided functions
so they will still call the python and numpy memory management callback
hooks.
The handlers are stored in a Python context variable (see https://docs.python.org/3/library/contextvars.html),
so there can be multiple handlers in a Python session.
.. c:function:: PyObject * PyDataMem_GetHandler()
Expand Down

0 comments on commit 5bc581f

Please sign in to comment.