public void computeToBeAllocatedObjs() {
	long shuffleBound = reducer.getSegsInShuffle().getShuffleBound();

	Set<Integer> inMemorySegIds = new HashSet<Integer>();
	inMemorySegIds.addAll(processedSegs);
	
	long inMemSegsBytes = 0;
	
	for(SegmentObj seg : segsInCopy) {
	    inMemorySegIds.add(seg.getTaskId());
	    inMemSegsBytes += seg.getRetainedHeap();
	}
	
	for(SegmentObj seg : segsInList) {
	    inMemorySegIds.add(seg.getTaskId());
	    inMemSegsBytes += seg.getRetainedHeap();
	}
	
	for(SegmentObj seg : segsInMerge) {
	    inMemorySegIds.add(seg.getTaskId());
	    inMemSegsBytes += seg.getRetainedHeap();
	}
	
	long leftShuffleBound = shuffleBound - inMemSegsBytes;
	
	
	long toBeAllocatedSegsTotalBytes = 0;
	for(Segment seg : totalSegs) {
	    if(!inMemorySegIds.contains(seg.getTaskId())) {
		toBeAllocatedSegs.add(seg.getTaskId());
		toBeAllocatedSegsTotalBytes += seg.getBytes();
	    }
	}
	
	long totalSegsBytesInShuffleBound;
	if(toBeAllocatedSegsTotalBytes >= leftShuffleBound)
	    totalSegsBytesInShuffleBound = shuffleBound;
	else
	    totalSegsBytesInShuffleBound = inMemSegsBytes + toBeAllocatedSegsTotalBytes;
	

	System.out.println("## To-be-allocated framework objects (totally occupy " 
		+ new DecimalFormat(",###").format(totalSegsBytesInShuffleBound) + " Bytes)");
	    
	System.out.println("| Location \t | FrameworkObj \t| Inner object \t| retainedHeap \t| Reason (from mapper) \t|");
	System.out.println("| :----------- | :----------- | :----------- | -----------: | :----------- |");
		
	for(Integer sId : toBeAllocatedSegs) 
	    System.out.println(totalSegs.get(sId));
	
	System.out.println();
    }