βThe strongest of all warriors are these two β Time and Patience.β β Leo Tolstoy, War and Peace
I will try not to convince you to get vim.
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Tim Holloway wrote:Using gc to get a better idea of how much active object memory you are using is a popular thing to do.
In older times, especially in real-time applications, it was sometimes useful to call gc before starting something resource-heavy. Otherwise the user experience could be marred when an automatical gc started in the middle of things and stalled the UI.
A classic example of this was one of the early Amiga Computer demos where it opened 4 windows, each with a moving graphic in them and played music in stereo*. The Amiga was the first home-grade computer with real-time pre-emptive multitasking capabilities straight from the factory. In fact, although Linux has always had pre-emptive multi-tasking, you had to do a custom kernel build if you wanted real-time and that was over a decade later.
But real-time and ore-emptive are no match for a quick-and-dirty port of BASIC that had a blocking garbage collector, so right in the middle of the demo, it would periodically stall - while playing music - to do garbage collection.
This isn't as much of a problem with the smarter and more incremental gc processes in modern Java, but you can see why people got into the habit.
===
The Amiga was probably the only computer whose on-the-box specifications contained not only RAM and CPU speed, but stereo separation in decibels and Total Harmonic Distortion. Even today, many PCs use a separate sound card. And even when it's on the motherboard, the sound chips used depend on the motherboard manufacturer.
Campbell Ritchie wrote:C++ is only an upgrade of C, which is intended for low‑level work, so I wouldn't expect it to have a GC utility. Sounds a nice idea, though.
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |