Added getSize() method to memory context