Page 1 of 1

Is there memory mapped files in KolibriOS?

Posted: Fri Jan 10, 2020 11:43 am
by Boppan
Functions like mmap or MapViewOfFile?

If no, should this feature be expected in future?

Thanks.

Re: Is there memory mapped files in KolibriOS?

Posted: Fri Jan 10, 2020 12:36 pm
by art_zh
Boppan
mmap() is a POSIX-specific tool used to spread the mad concept "everything is a file" to any non-file object.

This feature is not implemented in KolibriOS, neither ported with Linux libraries yet.

You better use Shared Memory interface to transfer data to/from your processes

Re: Is there memory mapped files in KolibriOS?

Posted: Fri Jan 10, 2020 4:30 pm
by Boppan
Yes, but I wanna use memory mapped files to read large files.

My english is terrible, so...

После того, как mmap открывает файл, ОС подгружает его по мере доступа к нему, и выгружает его уже неиспользуемые участки (page swapping). Так можно читать большие файлы не тратя слишком много оперативной памяти.

Re: Is there memory mapped files in KolibriOS?

Posted: Sun Jan 12, 2020 1:37 am
by art_zh
Boppan
Very interesting idea.
There is no page swapping in Kolibri (nobody needed it so far), but you can try to do-it-yourself as a really useful exercise

Re: Is there memory mapped files in KolibriOS?

Posted: Mon Jan 13, 2020 3:57 pm
by Boppan
Got it, thanks.