Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How stream buffer is implemented in C?

Tags:

c

io

I'm new to C, sorry if my question is dumb.

Where is the source code for IO stream? I want to see how the stream buffer is implemented, I can only see _IO_FILE struct in libc.h, but I don't see any internal buffer in this struct. Can anyone show me how can I locate the implmentation of stream buffer?


1 Answers

Where is the source code for IO stream?

For glibc the code is in libio directory.

In particular, _IO_new_file_fopen function implements fopen.

like image 135
Maxim Egorushkin Avatar answered Apr 24 '26 14:04

Maxim Egorushkin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!