473,322 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

buffer confusion

Hi

Could anyone clarify on the types of buffers used by a program?

For eg:

I have a C program that reads from a stdin to stdout.

What are the buffers involved here? I'm aware that there are 2.
One provided by the kernel on which a user don't have any control.
One provided with standard streams namely stdout, stdin and stderr. Each having a separate buffer.

Is my understanding correct?
Feb 19 '11 #1
1 1227
weaknessforcats
9,208 Expert Mod 8TB
A buffer is a very general term. All it means ia a "work area". There is a buffer for stdin, stdout, and stderr streams. You have no control over any of these buffers since they are part of the system and not part of your program. The most you do is flush the stdout and stderr buffers.

Similarly, there are buffers associates with each of your files just like the ones for stdin, stdout and stderr.

Maybe you could explain your question more fully.
Feb 19 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Henri Schomaecker | last post by:
Hi again, as I already wrote, I'm trying to get image binary data into a var holding an unsigned char string and then print it directly to the browser. I now already did some tries with an array...
5
by: manya | last post by:
Ok, it's been a while since I've done the whole memcpy stuff with C++ and I'm having a hard time remembering everything. I hope, however, that you can help me with my problem. I memcpy a...
7
by: eric | last post by:
Hi there, BP hit ratio = 1 - (BP physical reads / BP logical reads). If all the BP physical reads are asynchronous, it should mean that the pages are brought up to the bufferpool before the...
3
by: Ken Varn | last post by:
I have Page1 that does a transfer to page2. When the user is done with Page2, there is a button on Page2 that they can press to bring them back to Page1. I use Server.Transfer to navigate from...
6
by: 31337one | last post by:
Hello all, Let me introduce myself. I would say that I am an intermediate programmer in C++. I am studying comptuer science in college. However, I have never had a formal introduction to...
5
by: arnuld | last post by:
this is from mentioned section. i did not understand some things here: it means "flushing the buffer" and "writing to output device" are SAME thing, these are just 2 different names for the...
8
by: Guillaume Dargaud | last post by:
I just saw the following two lines in /usr/include/usb.h and my head is spinning: struct usb_dev_handle; typedef struct usb_dev_handle usb_dev_handle; What is that supposed to mean ? I...
331
by: Xah Lee | last post by:
http://xahlee.org/emacs/modernization.html ] The Modernization of Emacs ---------------------------------------- THE PROBLEM Emacs is a great editor. It is perhaps the most powerful and...
4
by: arnuld | last post by:
For my program , I want to convert an integer into array of characters. I see C has an atoi function o convert from an array of characters to integers but no standard function to convert from...
2
by: WalterGR | last post by:
(I've googled this to no avail.) I'm using PHP + Apache for building a website. The PHP docs for the "output_buffering" setting say: "You can enable output buffering for all files by setting...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.