Skip to content

Commit 725fd83

Browse files
committed
fail with better error message if the SeLockMemoryPrivilege
is not held
1 parent 108703c commit 725fd83

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Python/pylifecycle.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,9 @@ get_huge_pages_privilege(void)
514514
if (!status || (error != ERROR_SUCCESS))
515515
{
516516
CloseHandle(hToken);
517-
return _PyStatus_ERR("failed to obtain SeLockMemoryPrivilege for huge pages");
517+
return _PyStatus_ERR(
518+
"SeLockMemoryPrivilege not held; "
519+
"grant it via Local Security Policy or disable PYTHON_PYMALLOC_HUGEPAGES");
518520
}
519521
if (!CloseHandle(hToken))
520522
{

0 commit comments

Comments
 (0)