Implementing allocatedRecords and freedRecords