MCPcopy Index your code
hub / github.com/nodejs/node / SetASLR

Method SetASLR

deps/v8/tools/run_perf.py:1078–1089  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

1076
1077 @staticmethod
1078 def SetASLR(value):
1079 try:
1080 with open('/proc/sys/kernel/randomize_va_space', 'w') as f:
1081 f.write(str(value))
1082 except Exception:
1083 logging.exception(
1084 'Failed to update ASLR to %s. Are we running under sudo?', value)
1085 raise
1086
1087 new_value = CustomMachineConfiguration.GetASLR()
1088 if value != new_value:
1089 raise Exception('Present value is %s' % new_value)
1090
1091 @staticmethod
1092 def GetCPUCoresRange():

Callers 2

__enter__Method · 0.80
__exit__Method · 0.80

Calls 5

strFunction · 0.85
exceptionMethod · 0.80
GetASLRMethod · 0.80
openFunction · 0.50
writeMethod · 0.45

Tested by

no test coverage detected