The interface around RecoveryUnit::Change is an abstract interface where the callers pass in an instance as a unique_ptr. If this was based on std::function instead we could take advantage of the small object optimization where no memory allocation is needed if the callee is small.
Example of callback that is affected by this:
https://github.com/mongodb/mongo/blob/d140082164a67ebc5eb935aa7982b208f18ea274/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp#L1899-L1914