Enlarged the tree node reservation from num_saples to (num_samples << 1) - 1