In Linux mremap function is used to remap the memory that was mapped using the mmap. please help me to clarify the following:
- If the mremap function failed, what is the status of old mapped memory?
- If the mremap function failed, is there any need of calling the function munmap?
- If the mremap function succeeded, is any previous data in the remapped memory?