Top "Buffer" questions

A buffer is an area of memory set aside for temporary storage of data while it is being moved from one place to another.

How to determine the size of an allocated C buffer?

I have a buffer and want to do a test to see if the buffer has sufficient capacity I.e. …

c malloc buffer buffer-overflow
Display Pdf in browser using express js

app.post('/asset', function(request, response){ var tempFile="/home/applmgr/Desktop/123456.pdf"; fs.readFile(tempFile, function (err,data){ response.…

javascript node.js pdf express buffer
Byte array of unknown length in java

I am constructing an array of bytes in java and I don't know how long the array will be. I …

java buffer byte
How do you prefer to switch between buffers in Vim?

I've tried MiniBufExplorer, but I usually end up with several windows showing it or close it altogether. What I'd like …

vim editor buffer
What does flushing the buffer mean?

I am learning C++ and I found something that I can't understand: Output buffers can be explicitly flushed to force …

c++ input buffer output flush
Force line-buffering of stdout when piping to tee

Usually, stdout is line-buffered. In other words, as long as your printf argument ends with a newline, you can expect …

unix buffer pipe stdout tee
Binary buffer in Python

In Python you can use StringIO for a file-like buffer for character data. Memory-mapped file basically does similar thing for …

python binary io buffer
Pipe buffer size is 4k or 64k?

I read in multiple places that the default buffer size for a pipe is 4kB (for instance, here), and my …

c linux size buffer pipe
Specifying UDP receive buffer size at runtime in Linux

In Linux, one can specify the system's default receive buffer size for network packets, say UDP, using the following commands: …

linux sockets udp buffer
Get the number of bytes available in socket by 'recv' with 'MSG_PEEK' in C++

C++ has the following function to receive bytes from socket, it can check for number of bytes available with the …

c sockets buffer recv peek