memory management

hardware

Oh, You Wanted "Awesome" Edition

We recently upgraded our database server to 48 GB of memory -- because hardware is cheap, and programmers are expensive. Imagine our surprise, then, when we rebooted the server and saw only 32 GB of memory available in Windows Server 2008. Did we install the memory wrong? No, the BIOS

By Jeff Atwood ·
Comments

c++

Falling Into The Pit of Success

Eric Lippert notes the perils of programming in C++: I often think of C++ as my own personal Pit of Despair Programming Language. Unmanaged C++ makes it so easy to fall into traps. Think buffer overruns, memory leaks, double frees, mismatch between allocator and deallocator, using freed memory, umpteen dozen

By Jeff Atwood ·
Comments

operating systems

Why Does Vista Use All My Memory?

Windows Vista has a radically different approach to memory management. Check out the "Physical Memory, Free" column in my Task Manager: At the time this screenshot was taken, this machine had a few instances of IE7 running, plus one remote desktop. I'm hardly doing anything at

By Jeff Atwood ·
Comments

browser

Firefox Excessive Memory Usage

I like Firefox. I've even grown to like it slightly more than IE6, mostly because it has a far richer add-on ecosystem. But I have one serious problem with Firefox: This screenshot was taken after a few days of regular Firefox usage. That's over 900 megabytes

By Jeff Atwood ·
Comments

c++

Respecting Abstraction

In a recent post, Scott Koon proposes that to be a really good .NET programmer, you also need to be a really good C++ programmer: If you’ve spent all your life working in a GC’ed language, why would you ever need to know how memory management works, let

By Jeff Atwood ·
Comments

.net

The bloated world of Managed Code

Mark Russinovich recently posted a blog entry bemoaning the bloated footprint of managed .NET apps compared to their unmanaged equivalents. He starts by comparing a trivial managed implementation of Notepad to the one that ships with Windows: First notice the total CPU time consumed by each process. Remember, all I’

By Jeff Atwood ·
Comments

regex

To Compile or Not To Compile

I am currently in the middle of a way-overdue refactoring of MhtBuilder, which uses regular expressions extensively. I noticed that I had sort of mindlessly added RegexOptions.Compiled all over the place. It says “compiled” so it must be faster, right? Well, like so many other things, that depends: In

By Jeff Atwood ·
Comments

.net

I'm smarter than the Runtime!

One of the great features of .NET is the automatic garbage collection that absolves the developer of worrying about C++ style memory management, where for every allocate, there must be a destroy, or you're leaking. And yet, I frequently see overzealous developers write code like this: Public Function

By Jeff Atwood ·
Comments