Gregory Noma tried to use the debug_mode=(checkpoint_retention=#) configuration for
SERVER-37860 and got a memory error.
At the line where we free the checkpoint array he sees:
memory stomping bug: a word after object at 0x7f0e58a37de0 has been corrupted
Looking closely at the code I see a few bugs and inefficiencies that should be fixed that could explain this.