[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: persistent heap design advice
>
> >>>>> "KM" == Keith Morgan <kmorgan@inter-tax.com> writes:
>
> KM> I am interested in creating a persistent heap library and would
> KM> appreciate any suggestions on how to proceed. The 'persistent heap'
> KM> would be a region of virtual memory backed by a file and could be
> KM> expanded or contracted.
>
> KM> In order to build my 'persistent heap' it seems like I need a
> KM> fundamental facility that isn't provided by Linux. Please correct me if
> KM> I'm wrong! It would be something like mmap() ... but different. The
> KM> facility call it phmap for starters) would:
>
> What do you see missing??
> You obviously need a allactor built on top of your mmaped file but
> besides that I don't see anything missing.
>
> KM> -map virtual addresses to a user-specified file
> mmap MAP_SHARED
And just be careful not to use the same file mmap'ed MAP_SHARED between
"unrelated" processes ...
>
> KM> -coordinate the expansion/contraction of the file and the virtual
> KM> address space
> ftruncate, mmap, munmap
mremap might also come in handy, depending on how you want to handle
out-of-boundary requests ...
Kanoj
--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/