Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions Lib/test/memory_watchdog.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,13 @@
# If the process crashes, reading from the /proc entry will fail with ESRCH.


import os
import sys
import time
from test.support import get_pagesize


try:
page_size = os.sysconf('SC_PAGESIZE')
except (ValueError, AttributeError):
try:
page_size = os.sysconf('SC_PAGE_SIZE')
except (ValueError, AttributeError):
page_size = 4096

while True:
page_size = get_pagesize()
sys.stdin.seek(0)
statm = sys.stdin.read()
data = int(statm.split()[5])
Expand Down