🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #632

Re: Display Text

#632
From: Brian Willoughby
Date: Fri, 10 Apr 1992 18:10
32 lines
1844 bytes
>brianw@microsoft.com (Brian Willoughby) writes:
>> [...] First of all,
>> NXMapFile() is redundant since its purpose is to memory map the contents of
>> a file which will be accessed multiple times.[...]

jml@taco.visus.com (Jim Large) writes:
>Not necessarily true!  Even if you only intend to read a file once from
>start to finish, NXMapFile() is the preferred way to do it.  Why? because
>it does not have to allocate a buffer to read() file bytes into.  This
>could mean less swap space used.

I understand what you're saying, but I'm not sure that I am convinced.
Can you point me to a Technical Note, FAQ or even a posting which suggests
this?  I'm always looking for tips like those in "Making your app fly".

>Also, that the documentation says:
>     "NXOpenFile() opens a stream on the file specified by the file 
>      descriptor argument, fd, which can refer to a pipe or a socket."
>                                                    ^^^^^^^^^^^^^^^^
>We all know that this WILL work for a regular file too, but it's bad
>habit to break NeXT's rules :-)

What you quoted says that the fd *can* refer to a pipe or socket, NOT
that it *must* refer to one of them.  Are you sure that regular files
are specifically excluded?

Perhaps NeXT is listening and the author can clear this up.

-- 
Brian Willoughby  Software Design Engineer
Microsoft Corp.   Multimedia Systems Division
brianw@microsoft
Technical Details
Message-ID: <1992Apr10.181054.20258@microsoft.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!microsoft!brianw
References: <1992Apr01.221832.18270@microsoft.com> <1992Apr4.013007.16995@visus.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!microsoft!brianw
From: brianw@microsoft.com (Brian Willoughby)
Subject: Re: Display Text
Message-ID: <1992Apr10.181054.20258@microsoft.com>
Date: 10 Apr 92 18:10:54 GMT
Organization: Microsoft Corp.
Summary: NXOpenFile() and regular files
References: <1992Apr01.221832.18270@microsoft.com> <1992Apr4.013007.16995@visus.com>
Lines: 30