* MP <singular...@gmail.com> schrieb:

> We could have some "get that file into memory" call, that will try to
> use mmap if possible and store pointer to freeing the block (that
> would call munmap, free or some other method depending on how the
> block was acquired)

Exactly :)

The actual fs (and only it) should be responsible for getting the
block into memory and later freeing it again - the clients even
don't have to know that something like mmap exists at all.

Such an interface could be very useful for everyone who just needs
some file area in memory and doesnt want to care about sequential
reading.

Let's first try it out libmvfs, once it works fine, we can add it
to mcvfs ...

> But we need to cope with situations, where the file won't fit in RAM
> and won't fit in virtual memory either. For example 8gb file on i386
> architecture with 2 gb of ram.

The vfs call will simply return an appropriate error if there's not 
enough memory available (whether virtual or physical is out the
client's scope).


cu
-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service - http://www.metux.de/
---------------------------------------------------------------------
 Please visit the OpenSource QM Taskforce:
        http://wiki.metux.de/public/OpenSource_QM_Taskforce
 Patches / Fixes for a lot dozens of packages in dozens of versions:
        http://patches.metux.de/
---------------------------------------------------------------------
_______________________________________________
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel

Reply via email to