private void packCheckpoints() {
		if (checkpointHeads.size() <= maxCheckpoints) {
			return;
		}

		BufferNode cpHead = checkpointHeads.get(1); // oldest checkpoint (excluding baseline)
		BufferNode cpNode = cpHead.nextInCheckpoint;
		while (cpNode.id != TAIL) {
			BufferNode baseline = cpNode.nextVersion;
			BufferNode cpNext = cpNode.nextInCheckpoint;
			if (baseline.id != TAIL) {
				// Discard old baseline buffer node - free disk cache index
				disposeNode(baseline, true);
			}

			// Node becomes new baseline buffer version
			cpNode.checkpoint = 0;
			cpNode.addToCheckpoint(baselineCheckpointHead);

			cpNode = cpNext;
		}

		// Discard checkpoint list
		checkpointHeads.remove(1);

		hasNonUndoableChanges = true;
	}
If maximum number of checkpoints is exceeded, pack oldest
checkpoint into baseline.
Ghidra/Framework/DB/src/main/java/db/buffers/BufferMgr.java