Add memory devices and functions