diff --git a/selfdrive/locationd/locationd.py b/selfdrive/locationd/locationd.py index 7678393990..20ef4e981b 100755 --- a/selfdrive/locationd/locationd.py +++ b/selfdrive/locationd/locationd.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 import json +import gc import numpy as np import sympy as sp import cereal.messaging as messaging @@ -289,6 +290,8 @@ class Localizer(): def locationd_thread(sm, pm, disabled_logs=None): + gc.disable() + if disabled_logs is None: disabled_logs = [] diff --git a/selfdrive/locationd/paramsd.py b/selfdrive/locationd/paramsd.py index ba39bc0d70..d47c64cc61 100755 --- a/selfdrive/locationd/paramsd.py +++ b/selfdrive/locationd/paramsd.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +import gc import math import json @@ -65,6 +66,8 @@ class ParamsLearner: def main(sm=None, pm=None): + gc.disable() + if sm is None: sm = messaging.SubMaster(['liveLocationKalman', 'carState'], poll=['liveLocationKalman']) if pm is None: