Add anti-OOM features