Add tree memory limit