Is there a way to prepare and lock pages without actually allocating memory?
When accessing a buffer allocated using malloc/mmap
for the first time, there is a great chance to get a page fault which is critical in real-time application. So far the only solution considered was to allocate and page lock the buffers in advance (e.g. during preparation). This also means that the application has to manage a buffer pool.
Is there any chance that another mechanism exists to tell the kernel to prepare some pages for our process, in a way that subsequent calls to malloc/mmap
will be fast?
The answer might be just NO...