ian reinhart geiser on Wed, 19 Jun 2002 23:45:57 -0400


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

Re: [PLUG] this code crashes [OT]


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 19 June 2002 11:18 pm, gabriel rosenkoetter wrote:
> All that we've been discussing here are quick hacks. If Fred's
> really writing an installer, he'd do well to go learn about mmap(2).

Well it really depends imho where this installer is to run. I guess I have a 
hard time believing that an installer is worth much more trouble than a 
moderately complex perl or python script, but I do not know the full scope of 
this, so I probably am speaking out of turn.  What will mmap gain you in 
speed that will win out the irritation of mastering such a low level 
function?  Last time I checked (my clients at least) enjoyed faster time to 
market over a few seconds at runtime.

> Ian, isn't this how KDE's file interaction stuff works (when it's
> interacting with a local file)? Or does it really use C++ streams?
> (Hope your local standard C++ library dtrt, in that case, or you're
> way slower than you need to be.)

No I don't think they use streams per say.  KDE uses Qts File IO routines.   
- From what I can see from the source on Unix they just use plain fopen, fseek, 
and getch.  The windows side uses native win32 code.  I am assuming they took 
the lowest common denominator for the API since Qt is more about portability 
than nifty C hacks.

I seem to remember though that the streams in C++'s file io are still based 
off of the lower level functions.  I have not looked at the code for most 
implementations of ifstream lately, so I cannot fathom to guess how gcc does 
it...  I know metrowerks just had a thin wrapper arround the macos toolbox 
calls.

cheers
- -ian reinhart geiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9EU4SPy62TRm8dvgRAoUxAKDHLDao4LTJiiq+VgkSTV6wIiLxTwCg6JRq
XvPX0CgUE6t+UGGVBxuG59g=
=Bo7A
-----END PGP SIGNATURE-----


______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug