`$memoryLimit` should be null by default