Changed heap size getter to layout getter, for use by the gc later.