mod_mam includes a subset of mod_storage_memory (from prosody-modules) that is used if the currently selected storage driver does not support archives.
This was mostly useful before mod_storage_internal gained support for archives.
So the code could be deleted from mod_mam. mod_storage_memory itself could possibly be included in core, if deemed worthy (but that's a separate issue).
titleRemove in-memory arhive driver from mod_mam
I think we should probably merge mod_storage_memory