Adds functions for memory testing