Hacker News new | ask | show | jobs
by OneMoreIdol 4033 days ago
That's kinda what I was thinking when I commented, and there are sure to be exceptions. But I don't see anything different with your Snabb switch example. You can probably use Java and JNI for that matter to call mmap, but would you be able to write an implementation of mmap in LuaJIT ?
1 comments

Yes you can call mmap with the ffi in LuaJIT just fine. It is not very complicated, it just asks the kernel to do it. Implementing what the kernel does, well that does need some assembly.
Indeed we agree. Using any ffi for that matter.