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

Function _get_madvise_hugepage

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

* This function tells whether NumPy attempts to call `madvise` with * `MADV_HUGEPAGE`. `madvise` is only ever used on linux, so the value * of `_madvise_hugepage` may be ignored. * * It is exposed to Python as `np.core.multiarray._get_madvise_hugepage`. */

Source from the content-addressed store, hash-verified

46 * It is exposed to Python as `np.core.multiarray._get_madvise_hugepage`.
47 */
48NPY_NO_EXPORT PyObject *
49_get_madvise_hugepage(PyObject *NPY_UNUSED(self), PyObject *NPY_UNUSED(args))
50{
51#ifdef NPY_OS_LINUX
52 if (_madvise_hugepage) {
53 Py_RETURN_TRUE;
54 }
55#endif
56 Py_RETURN_FALSE;
57}
58
59
60/*

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected