c-extension-tutorial icon indicating copy to clipboard operation
c-extension-tutorial copied to clipboard

Suggestion: include a bit on memory management

Open madphysicist opened this issue 7 years ago • 0 comments

Some questions that have been bothering me about the functions described in https://docs.python.org/3/c-api/memory.html:

  • What are the differences between PyMem_RawMalloc, PyMem_Malloc, PyObject_Malloc, etc.?
  • Do these functions automatically raise a MemoryError if they return None?

While the answers are out there (I ended up reading the source code and some Stack Overflow posts), they are non-trivial to find.

madphysicist avatar Apr 26 '18 20:04 madphysicist