Replace macro for memory manipulation.