Ronald Oussoren added the comment:
According to https://man7.org/linux/man-pages/man2/getrlimit.2.html there is no
RLIMIT_VMEM on linux, RLIMIT_AS is the closest equivalent.
--
nosy: +ronaldoussoren
resolution: -> not a bug
stage: -> resolved
status: open -> closed
Andrei Kulakov added the comment:
Also note that according to
https://edwards.sdsu.edu/research/memory-and-core-usage-on-sge/,
Linux systems use RLIMIT_AS instead of RLMIMIT_VMEM.
My system (MacOS), also has RLIMIT_AS defined but not RLIMIT_VMEM.
--
Andrei Kulakov added the comment:
The docs for resource module state:
This module does not attempt to mask platform differences — symbols not defined
for a platform will not be available from this module on that platform.
Therefore I think this can be closed.
--
nosy: +andrei.avk
typ
New submission from Titusz Ban :
While trying to limit the virtual memory used by a process, using
import resource
MAX_VIRTUAL_MEMORY = 1 * 1024 * 1024
resource.setrlimit(resource.RLIMIT_VMEM, (MAX_VIRTUAL_MEMORY,
MAX_VIRTUAL_MEMORY))
The following error occurred:
AttributeError: module 'res