Commit 690b442 1 parent 2735caf commit 690b442 Copy full SHA for 690b442
File tree 1 file changed +12
-10
lines changed
1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change 9
9
import shlex
10
10
import re
11
11
import time
12
+ import platform
12
13
from src .project import Project
13
14
from src .cfg import opcodes
14
15
from src .slicing import interesting_slices , slice_to_program
@@ -242,16 +243,17 @@ def main():
242
243
243
244
savefilebase = args .savefile or args .file
244
245
245
- # limit default memory to 6GB
246
- if args .memory :
247
- mem_limit = int (args .memory ) * 1024 * 1024 * 1024
248
- else :
249
- mem_limit = 6 * 1024 * 1024 * 1024
250
- try :
251
- rsrc = resource .RLIMIT_VMEM
252
- except :
253
- rsrc = resource .RLIMIT_AS
254
- resource .setrlimit (rsrc , (mem_limit , mem_limit ))
246
+ # limit default memory to 6GB on Linux
247
+ if platform .system () == 'Linux' :
248
+ if args .memory :
249
+ mem_limit = int (args .memory ) * 1024 * 1024 * 1024
250
+ else :
251
+ mem_limit = 6 * 1024 * 1024 * 1024
252
+ try :
253
+ rsrc = resource .RLIMIT_VMEM
254
+ except :
255
+ rsrc = resource .RLIMIT_AS
256
+ resource .setrlimit (rsrc , (mem_limit , mem_limit ))
255
257
256
258
initial_storage = dict ()
257
259
if args .initial_storage_file :
You can’t perform that action at this time.
0 commit comments