@Override
        public void loadNext() {
            // This pointer points to a 4-byte record length, followed by the record's bytes
            final long recordPointer = array.get(position);
            baseObject = memoryManager.getPage(recordPointer);
            baseOffset = memoryManager.getOffsetInPage(recordPointer) + 4;  // Skip over record length
            recordLength = Platform.getInt(baseObject, baseOffset - 4);
            keyPrefix = array.get(position + 1);
            position += 2;
        }
Inserts a record to be sorted. Assumes that the record pointer points to a record length
stored as a 4-byte integer, followed by the record's bytes.

@param recordPointer pointer to a record in a data page, encoded by {@link TaskMemoryManager}.
@param keyPrefix     a user-defined key prefix
indexr-query-opt/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java