Memory Management for set and get in NVM