code: int getNumOccupiedMemorySegments() {
  		// either the number of memory segments, or one for spilling
  		final int numPartitionBuffers = this.partitionBuffers != null ?
  				this.partitionBuffers.length
  				: this.buildSideWriteBuffer.getNumOccupiedMemorySegments();
  		return numPartitionBuffers + bucketArea.buckets.length + bucketArea.numOverflowSegments;
  	}
docs: Gets the number of memory segments used by this partition, which includes build side
  memory buffers and overflow memory segments.
  
  @return The number of occupied memory segments.