Hi,
anyone knows if mremap round off the new_memory parameter or it has to be done manually?
Hi,
anyone knows if mremap round off the new_memory parameter or it has to be done manually?
What do you mean by round off - page align?
Hmm ...
What new_memory are you talking about? Do you mean new_size? Or the new_address you may pass if you specify the MREMAP_FIXED flag?Code:~ $> man mremap SYNOPSIS #define _GNU_SOURCE #include <unistd.h> #include <sys/mman.h> void * mremap(void *old_address, size_t old_size , size_t new_size, int flags);
I would strongly assume that new_address must be page-aligned already, since the same requirement applies to mmap()'s start parameter.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law