nice, so I can avoid referencing the mmap()ed region in steps of 4096 bytes.
in your suggested solution:
ptr=mmap(blah)
mlock(ptr, ...)
munmap(ptr, len)
can I avoid an munlock(ptr,...) call after mmap()ed buffer is no longer needed,
will mmap() re-utilize that region on the next call, or could this avoiding of
munlock() cause the kernel to get short of free pages ?
( Just a paranoid idea :-) )
But as stated in man munmap :
---
The munmap system call deletes the mappings for the speci-
fied address range, and causes further references to
addresses within the range to generate invalid memory ref-
erences.
---
I guess since the page does not longer exist , there is no reason to
keep the page locked into mem.
regards,
Benno.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/