ALERT

[WEBINAR] See the Whole Story: The Case for a Visualization Platform

Garbage

Definition - What does Garbage mean?

Garbage, in the context of computers, is used to refer to any unwanted or unused data occupying memory space. Unallocated memory must be free of garbage values before allocating them, as the presence of garbage values may cause security issues and exceptional conditions.

Techopedia explains Garbage

Under normal usage, the word garbage refers to any waste product or something that is no more useful. Just as garbage does not occur naturally in the real world, garbage in the computing world is also created by programmers and their style of writing programs.

In computing terms it may refer to either of two meanings:

  • Anything that is unreadable or unviewable on the computer screen to a normal user may be perceived to be a garbage file or value. This may occur when the user is trying to open a corrupted file or a file of a format that is not supported by the system.
  • From a programming point of view, the term garbage is used to point to unwanted data held by the primary memory. These data may have been stored in the memory by a previous program and is unwanted and unusable for the current program execution.

When users write programs, the presence of garbage values must be addressed as these can cause runtime issues during program execution. Programming languages like C and C++ do not provide any automatic garbage management features, and hence when writing programs in these languages, the programmer must free all the allocated memory before the associated objects are destroyed. Programming languages like Java and .NET framework languages provide automatic garbage collection features, freeing the programmer from the memory deallocation issues.

When manual memory allocation and freeing of memory is not done properly, human errors may cause bugs or serious threats to system security. When the programmer fails to free the memory after its use, memory leaks may occur and there is also a chance of system crashes due to dangling pointers.

Connect with us

Techopedia on Linkedin
Techopedia on Linkedin
Tweat cdn.techopedia.com
"Techopedia" on Twitter


'@Techopedia'
Sign up for Techopedia's Free Newsletter!

Email Newsletter

Join thousands of others with our weekly newsletter

Resources
Free Whitepaper: The Path to Hybrid Cloud
Free Whitepaper: The Path to Hybrid Cloud:
The Path to Hybrid Cloud: Intelligent Bursting To Amazon Web Services & Microsoft Azure
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.