Buffer (the article is not the most elucidative) it is essentially an abstract concept. There is no area of memory that is a buffer because any area can be one. You define what is one buffer. He’s just a set of bytes which is normally stored in a variable temporarily.
In C it is usually organized through a array allocated somewhere in memory. In this cited example it is allocated in the stack, but nothing prevents it from being allocated in the heap also.
Nothing stops you from calling your own buffer of exemplo
but the most common is to give a name that makes it clear that it will be used as buffer, so Vari’s dream could be buffer
. It doesn’t change anything technically but makes the intention clearer, and this is important when we’re coding.
And of course a variable called buffer
can be used for other things as well, it is only recommended not to do so because of an organization.
A buffer is used to store any information that comes from somewhere. The details of how this will be done do not concern the buffer. It just needs to be allocated somewhere, and the program will define where, and have enough space for what is desired at that time.
So, technically the buffer there is, it’s just a form of nomenclature for something common to help better understand what you’re doing.
This is valid at least within the context of software programming, especially in C and other high-level languages.