xfs
[Top] [All Lists]

mmap() Limitation

To: "'linux-xfs@xxxxxxxxxxx'" <linux-xfs@xxxxxxxxxxx>
Subject: mmap() Limitation
From: "Quang Nguyen (Ngo)" <quang.nguyen@xxxxxxxxxxxx>
Date: Wed, 5 Dec 2001 10:50:54 -0800
Sender: owner-linux-xfs@xxxxxxxxxxx
Let's say I want to write files to a tape device using:

   fd = open(file, O_RDONLY);
   addr = mmap(0, size, PROT_READ, MAP_PRIVATE, fd, 0);
   writeTape(addr, size);
   close(fd);
   munmap(addr, size);
Is there a limit on how big the file be?

Should I just use read() and write()?  Isn't mmap() faster?

There's a paper called "64 Bit File Access" from the XFS site that talks
about mmap64(() and stat64().  Should I be using those 64-bit functions
instead?

Thanks,
Quang


_____________________________________________________________________
This message has been checked for all known viruses by the 
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/stats.asp


[[HTML alternate version deleted]]


<Prev in Thread] Current Thread [Next in Thread>