FidoNet Echomail Archive

<<< Previous Index Next >>>

From: Frank Adam
To: All
Date: 1997-05-02 06:44:56
Subject: setvbuf()

Hi Guys,

1. How is this function used most efficiently ? 
If i have a buffer which is 50000 bytes and used for both binary read/write, 
should i let setvbuf() buffer the lot ? The buffer *is* expected to fill up
most of the time. 
2. Is there a potential problem when using larger buffers especially on 
an output stream ? 
I've found, that by increasing the buffer size, i've had some bytes 
gone corrupt in a simple fread/fwrite block. It still could be a bug 
elsewhere in the code, but so far it seems to happen when the buffer size
is increased passed 1K. setvbuf() did return success.

Thanks in adv..

 Regards, Frank

--- Msged 4.00
 * Origin: The ticking point, Melbourne, Australia. (3:635/728.21)
SEEN-BY: 633/267 270
@PATH: 635/728 633/267

<<< Previous Index Next >>>