5 gigs of contiguos kernel VM shared with userspace

Vadim Goncharov <[email protected]>
Newsgroups gmane.os.freebsd.devel.hackers
Message-ID <[email protected]>
Hello,

Are there ways to allocate in kernel a range of contiguous virtual address
space, share it with userspace, and preferably run memory allocator inside
it which has it's pointers relative to base address? Same as processes
cooperating via mmap(), but for kernel<->user.

I'd like just run UMA inside it, but seems UMA zones cannot be told to take
from particular range, or am I missing something? On user side, jemalloc
mentions something like arenas, but seems it is too unprepared for even
mmap() between processes case (may be adapting some TLSF allocator [*] is
possible, but that's a premature question before VM one).

Size is not necessarily gigabytes, I expect it more often to be just megabytes
(see ARB_* family of macros/functions), but in future can be. If it ever can be
turned to CoW transactional semantics (think of SQLite journal, but in memory),
it would be wonderful!


[*] A paper and several implementations:
http://www.gii.upv.es/tlsf/files/papers/ecrts04_tlsf.pdf
https://github.com/mattconte/tlsf
https://github.com/sysprog21/tlsf-bsd
https://github.com/rmind/tlsf

-- 
WBR, @nuclight
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.