void putFreeBlock(int index, int nextFreeIndex) throws IOException {

		if (index > bufferCount) {
			throw new EOFException(
				"Free buffer index too large (" + index + " > " + bufferCount + ")");
		}
		if (index == bufferCount) {
			++bufferCount;
		}

		// Write version 1 buffer prefix
		seekBufferBlock(index);

		raf.writeByte(EMPTY_BUFFER);
		raf.writeInt(nextFreeIndex);
	}
Update a storage block as free and link to the next free block.
@param index block index of free block
@param nextFreeIndex block index of next free block, a -1 should be specified to mark the
end of the linked list.
@throws IOException if an I/O error occurs
Ghidra/Framework/DB/src/main/java/db/buffers/LocalBufferFile.java