Skip to content

Instantly share code, notes, and snippets.

View cgarjun's full-sized avatar

Arjun Thekkumadathil cgarjun

  • cgarjun
  • Bangalore, India
View GitHub Profile
@cgarjun
cgarjun / limit-virtual-memory-of-subprocess.py
Created February 8, 2023 07:33 — forked from s3rvac/limit-virtual-memory-of-subprocess.py
Limits the maximal virtual memory for a subprocess in Python on Linux.
#!/usr/bin/env python3
#
# Limits the maximal virtual memory for a subprocess in Python.
#
# Linux only.
#
import subprocess
import resource