Add maxHeapSize as global variable