I do not use trees anymore within the optimized memory management. I realized that I can calculate the index of an array by the size and use stacks of memory segments under each array element. This should be much faster.