2008-08-18 22:57:51     is RAMFS sequential and contiguous?

Document created by Aaronwu Employee on Aug 7, 2013
Version 1Show Document
  • View in full screen mode

2008-08-18 22:57:51     is RAMFS sequential and contiguous?

Wei Jiang (CHINA)

Message: 60617   

 

Hi all,

 

    My file system is RAMFS in uClinux-08r1.

 

    Is it safe if I want to mmap a file just like this:

 

    buf = mmap(NULL, size, PROT_READ, MAP_PRIVATE, in_fd, 0).

 

     Thanks a lot..

 

          Wei Jiang

QuoteReplyEditDelete

 

 

2008-08-19 00:31:57     Re: is RAMFS sequential and contiguous?

Mike Frysinger (UNITED STATES)

Message: 60622   

 

the file linux-2.6.x/Documentation/filesystems/ramfs-rootfs-initramfs.txt talks about implementation details of ramfs

QuoteReplyEditDelete

 

 

2008-08-19 00:49:53     Re: is RAMFS sequential and contiguous?

Wei Jiang (CHINA)

Message: 60625   

 

Hi Mike,

 

    Thank you for you kindly reply.

 

    If I want to use mmap in a file system with uClinux, then the file system should be sequential and contiguous, isn't it?

 

    I can't find the helpful information in this document but mmap in RAMFS runs OK in my test.

 

    Thanks again..

 

            Wei Jiang

QuoteReplyEditDelete

 

 

2008-08-19 18:05:33     Re: is RAMFS sequential and contiguous?

Mike Frysinger (UNITED STATES)

Message: 60690   

 

you would have to test a large file ... one that will cross a page boundary

QuoteReplyEditDelete

Attachments

    Outcomes