Should operator overload methods be virtual?

Steven Schveighoffer schveiguy at yahoo.com
Wed Dec 2 10:15:33 PST 2009


On Wed, 02 Dec 2009 01:36:54 -0500, retard <re at tard.com.invalid> wrote:

> If it leaks 200 MB per day, people can already run it for a month on a
> typical home PC before the machine runs out of physical memory (assuming
> 8GB physical RAM like most of my friends have these days on their
> $500-600 systems).

Notice I said XP.  this system had 500MB of RAM, it's not a new system.   
AFAIK, XP doesn't even *support* more than 4GB of RAM (and I don't think  
my chipset would support more than 1G).  200MB is probably the most the OS  
would give it, because I think my typical idle memory usage was 400MB.

Let's just say instead of 200MB, it uses whatever memory was left to  
consume, ok?

But the memory leak isn't the biggest issue, that is clearly a bug and not  
a feature.  The problem I have is the 10MB of memory it uses to put an  
icon on the task tray.  I see loads of these icons all the time on other  
people's computers, all using up huge chunks of memory so they can  
instantaneously check for the latest logitech driver for their keyboard  
(oooh! what new awesome amazing things will my keyboard be able to do with  
this upgrade!).  It's the computer equivalent to hiring a team of people  
around you 24/7, and some of those team member's *ONLY* job is to give you  
a q-tip in case you want it.

And moores law seems to apply to moronic icon developers as well -- the  
more memory available, the bloatier they make their nifty task tray icons  
"hey, Windows 7 supports an alpha channel!  let's make the icon [that  
nobody ever uses] fade in and out!"

> A typical user reboots every day so a program can freely leak at least 7
> gigs per day, (during a 8h work day) that's 15 MB per minute or 250 kB
> per second. According to Moore's law the leak rate can grow
> exponentially. So in 2013 your typical taskbar apps leak at least one
> megabyte per second and most of users are still happy. With a RAM upgrade
> they can use apps that leak 4+ MB per second. As users tend to restart
> programs when the system starts running slowly, the shorter uptime of
> apps means that they can leak a lot more.

I don't know what typical users you know, but the typical users I know do  
not reboot their computer unless it requires it.  Most of the people I  
know have installed so much bloatware on their system that it takes 20  
minutes to boot their system, so they only reboot when necessary.

Your idea of "x amount of leakage is OK" where x > 0 is exactly the  
developer mindset I was talking about.

-Steve



More information about the Digitalmars-d mailing list