Code for memory-sharing mobile app.