glebpom/linux-aio-tokio

Getting (MemLock) "Cannot Allocate Memory" on LockedBuf::with_size()

Closed this issue · 5 comments

Any idea on how to debug this? I'm requesting a fairly small size ~200000

Its from lock, not mmap.

Either way I figured, Its a user limit on locked memory in my case. ( ulimit -l )

Would it possible to make LockedBuf a trait so that a user could provide a different implementation?

What is the goal? Linux AIO requires the memory to be locked so that it never gets swapped out. Any ideas why implementation may be different?

@glebpom for example someone could maintain its own pool of preallocated mapped regions that they would want to reuse instead of doing an mmap every time