The Latin word verrĕre derived from the vulgar Latin versūra, an idea that is linked to the act of sweeping. The etymological evolution continued and the concept reached our language as garbage.
In its broadest sense, garbage refers to that which causes dirt. For example: “Stop collecting garbage and start cleaning this pigsty!” , “This type of productive activity generates a lot of garbage”, “Ideally this work should not cause garbage, but that is impossible.
The notion of garbage also refers to waste and residues: “Please go take out the garbage that the collector will pass in a few minutes”, “I have already cleaned my room: I have filled three garbage bags”, “It is important to know garbage can be recycled to give it a new use ”.
The place where these items are thrown is even called garbage: “Horror in Villa San Carlos: they found a dead baby in the garbage”, “Last night I threw a pile of old documents into the garbage”, “Go check if, by mistake, you put the photo in the garbage can. “
Trash, on the other hand, has several symbolic uses. This is how it is said to the one or that which provokes contempt or causes disgust: “You are rubbish! You can’t do this to me ”, “ This movie is rubbish, I don’t understand how it won so many awards ”, “ I’m not going to make agreements with Roberto: that man is rubbish who cheated my father ”.
When the term accompanies a noun, it becomes an adjective that indicates its little or no quality or importance: “The company offered me a garbage contract but I had to accept it since I need the money”, “The only thing I received today is mail trash ”.
In the field of programming, we speak of a garbage collector to refer to a mechanism that is part of memory management. It is implemented in certain languages, both interpreted and semi-interpreted, and one of its purposes is to speed up access to main memory.
Broadly speaking, we can say that the garbage collector is responsible for compacting the memory that is being used at a given moment, moving all the objects to the beginning of it to avoid having unused spaces between them. In this way, it achieves that all the available area is on one side, facilitating its use.
This concept was created in 1958 by John McCarthy, a prominent computer scientist who made great contributions to the field of artificial intelligence. His work focused on the family of languages called Lisp, in whose development he also participated, for which he wanted to avoid that memory management had to be done manually.
The concept of memory may seem too abstract for many people, but it is something basic for the execution of any program, as much as a table on which we support our notebooks and books when doing research work. The operating system must make a certain amount of memory available to the program, so that it can manage it with the aim of:
* reserve spaces to store different types of data;
* free those spaces that are no longer needed;
* compact memory so that free spaces are grouped, as explained above;
* keep a record of the use of each space.
Typically, programmers have different functions to tell the program to perform these tasks at specific times during its execution. It goes without saying that the result they obtain in each case depends both on the quality of said code and on the use they give it.