MCPcopy Create free account
hub / github.com/numpy/numpy / PyDataMem_FREE

Function PyDataMem_FREE

numpy/core/src/multiarray/alloc.c:322–336  ·  view source on GitHub ↗

NUMPY_API * Free memory for array data. */

Source from the content-addressed store, hash-verified

320 * Free memory for array data.
321 */
322NPY_NO_EXPORT void
323PyDataMem_FREE(void *ptr)
324{
325 PyTraceMalloc_Untrack(NPY_TRACE_DOMAIN, (npy_uintp)ptr);
326 free(ptr);
327 if (_PyDataMem_eventhook != NULL) {
328 NPY_ALLOW_C_API_DEF
329 NPY_ALLOW_C_API
330 if (_PyDataMem_eventhook != NULL) {
331 (*_PyDataMem_eventhook)(ptr, NULL, 0,
332 _PyDataMem_eventhook_user_data);
333 }
334 NPY_DISABLE_C_API
335 }
336}
337
338/*NUMPY_API
339 * Reallocate/resize memory for array data.

Callers 7

PyArray_ChooseFunction · 0.85
PyArray_LexSortFunction · 0.85
PyArray_ZeroFunction · 0.85
PyArray_OneFunction · 0.85
_set_constantFunction · 0.85
neighiter_deallocFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected