kopia lustrzana https://gitlab.com/sane-project/website
119 wiersze
4.9 KiB
HTML
119 wiersze
4.9 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
|
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>sane-devel: Re: OT: Is "fileno()" conform to ANSI or</TITLE>
|
|
<META NAME="Author" CONTENT="Oliver Rauch (oliver.rauch@rauch-domain.de)">
|
|
<META NAME="Subject" CONTENT="Re: OT: Is "fileno()" conform to ANSI or POSIX?">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
|
<H1>Re: OT: Is "fileno()" conform to ANSI or POSIX?</H1>
|
|
<!-- received="Mon Mar 5 10:56:32 2001" -->
|
|
<!-- isoreceived="20010305185632" -->
|
|
<!-- sent="Mon, 05 Mar 2001 20:16:26 +0100" -->
|
|
<!-- isosent="20010305191626" -->
|
|
<!-- name="Oliver Rauch" -->
|
|
<!-- email="oliver.rauch@rauch-domain.de" -->
|
|
<!-- subject="Re: OT: Is "fileno()" conform to ANSI or POSIX?" -->
|
|
<!-- id="3AA3E60A.319277BC@rauch-domain.de" -->
|
|
<!-- inreplyto="E14a0HM-0006o3-00@zoot" -->
|
|
<STRONG>From:</STRONG> Oliver Rauch (<A HREF="mailto:oliver.rauch@rauch-domain.de?Subject=Re:%20OT:%20Is%20"fileno()"%20conform%20to%20ANSI%20or%20POSIX?&In-Reply-To=<3AA3E60A.319277BC@rauch-domain.de>"><EM>oliver.rauch@rauch-domain.de</EM></A>)<BR>
|
|
<STRONG>Date:</STRONG> Mon Mar 05 2001 - 11:16:26 PST
|
|
<P>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0076.html">Frederik Ramm: "sane_get_parameters before sane_start"</A>
|
|
<UL>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0074.html">Dario Abatianni: "Snapscan e50 USB Question"</A>
|
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0073.html">Petter Reinholdtsen: "Re: OT: Is "fileno()" conform to ANSI or POSIX?"</A>
|
|
<!-- nextthread="start" -->
|
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0080.html">Ulrich Deiters: "Re: OT: Is "fileno()" conform to ANSI or POSIX?"</A>
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#75">[ date ]</A>
|
|
<A HREF="index.html#75">[ thread ]</A>
|
|
<A HREF="subject.html#75">[ subject ]</A>
|
|
<A HREF="author.html#75">[ author ]</A>
|
|
</UL>
|
|
<HR NOSHADE><P>
|
|
<!-- body="start" -->
|
|
<P>
|
|
Petter Reinholdtsen wrote:
|
|
<BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> [Oliver Rauch]
|
|
</EM><BR>
|
|
<EM>> > By the way, does anyone know if mmap does anything else than
|
|
</EM><BR>
|
|
<EM>> > buffer=malloc(size) + fread(buffer, size, 1, file) ?
|
|
</EM><BR>
|
|
<EM>> >
|
|
</EM><BR>
|
|
<EM>> > This way I would not depend on mmap and fileno.
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> Eh, yes. mmap() maps the file into the process address space, and
|
|
</EM><BR>
|
|
<EM>> allow you to access the file content without copying it from the
|
|
</EM><BR>
|
|
<EM>> kernel buffers into your own buffers. (ie the kernel buffers become
|
|
</EM><BR>
|
|
<EM>> part of the process address space.)
|
|
</EM><BR>
|
|
<EM>>
|
|
</EM><BR>
|
|
<EM>> It is a lot faster than malloc() and fread().
|
|
</EM><BR>
|
|
<P>Hi Petter,
|
|
<BR>
|
|
<P>but if I understand that right this is releavant only
|
|
<BR>
|
|
for the mmap call, so if I call malloc and fread
|
|
<BR>
|
|
this is a bit slower than calling mmap, but accessing
|
|
<BR>
|
|
the buffer memory should not make any speed differences?!
|
|
<BR>
|
|
<P>Bye
|
|
<BR>
|
|
Oliver
|
|
<BR>
|
|
<P><PRE>
|
|
--
|
|
Homepage: <A HREF="http://www.rauch-domain.de">http://www.rauch-domain.de</A>
|
|
sane-umax: <A HREF="http://www.rauch-domain.de/sane-umax">http://www.rauch-domain.de/sane-umax</A>
|
|
xsane: <A HREF="http://www.xsane.org">http://www.xsane.org</A>
|
|
E-Mail: mailto:<A HREF="mailto:Oliver.Rauch@rauch-domain.de?Subject=Re:%20OT:%20Is%20"fileno()"%20conform%20to%20ANSI%20or%20POSIX?&In-Reply-To=<3AA3E60A.319277BC@rauch-domain.de>">Oliver.Rauch@rauch-domain.de</A>
|
|
<P>--
|
|
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
|
|
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20OT:%20Is%20"fileno()"%20conform%20to%20ANSI%20or%20POSIX?&In-Reply-To=<3AA3E60A.319277BC@rauch-domain.de>">majordomo@mostang.com</A>
|
|
</PRE>
|
|
<P><!-- body="end" -->
|
|
<HR NOSHADE>
|
|
<UL>
|
|
<!-- next="start" -->
|
|
<LI><STRONG>Next message:</STRONG> <A HREF="0076.html">Frederik Ramm: "sane_get_parameters before sane_start"</A>
|
|
<LI><STRONG>Previous message:</STRONG> <A HREF="0074.html">Dario Abatianni: "Snapscan e50 USB Question"</A>
|
|
<LI><STRONG>In reply to:</STRONG> <A HREF="0073.html">Petter Reinholdtsen: "Re: OT: Is "fileno()" conform to ANSI or POSIX?"</A>
|
|
<!-- nextthread="start" -->
|
|
<LI><STRONG>Next in thread:</STRONG> <A HREF="0080.html">Ulrich Deiters: "Re: OT: Is "fileno()" conform to ANSI or POSIX?"</A>
|
|
<!-- reply="end" -->
|
|
<LI><STRONG>Messages sorted by:</STRONG>
|
|
<A HREF="date.html#75">[ date ]</A>
|
|
<A HREF="index.html#75">[ thread ]</A>
|
|
<A HREF="subject.html#75">[ subject ]</A>
|
|
<A HREF="author.html#75">[ author ]</A>
|
|
</UL>
|
|
<!-- trailer="footer" -->
|
|
<HR NOSHADE>
|
|
<P>
|
|
<SMALL>
|
|
<EM>
|
|
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
|
|
: <EM>Mon Mar 05 2001 - 10:56:43 PST</EM>
|
|
</EM>
|
|
</SMALL>
|
|
</BODY>
|
|
</HTML>
|