Jump to page content

Bug of the moment 2006-04-29

I was curious about how my Windows 3 resolution switcher worked (I have not booted my 486 in a long time now), and took a trip down Memory Lane to revisit all my old C code. To my surprise, I came across a screenshot I took of one of my programs. Called Contents, it would count up the number of files and bytes occupied by a folder tree, and calculate the space lost to internal fragmentation. In theory.

Apparently, I have actually gained space through internal fragmentation. As I recall, this bug would only manifest itself when running under virtual DOS inside Windows 3.11, and not in regular DOS. Certainly, the bug remains present in NTVDM:

Also note that my hard drive has closer to 50 GB of files on it! Something triggers it to fail to detect and count them all. I am guessing that the issue with the internal fragmentation count is somewhere in here, but I don’t know:

space += (long)ceil ((float)fileInfo.ff_fsize / (float)sectorSize) * sectorSize;

I also found this little gem in my wandering:

Even looking at the source, I don’t know what this was supposed to achieve. And why Jack Robinson?

Posted 29th April 2006 – Comments and questions?