Re: data + pendrive + memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, 25 Jul 2005, Rodrigo Ramos wrote:
> 
> IMHO, if a lack of memory happens the Linux will start using swap, then
> the file will end in the hard drive. When I am working with a file in a
> pendrive any information of it is sent to the hard drive ? If it happens
> what is/are the reason(s).

If you always access the file only with mmap(..MAP_SHARED..) (or
MAP_PRIVATE in a read-only manner), or if you always make sure that any
programs that access the data use mlock() to protect it, you'll never hit
the regular disk.

mmap() is generally the better option, since locking down memory may not
be available to normal users.

		Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux