add support for memory and memory swap