Progress updates
January 2026 - Leaky memories

Sorry for the silence in recent times - I've definitely fallen behind
on my promises of monthly updates.


In this case, the main reason I haven't posted much is because I've
been working on just a single problem for a number of months now. At
some point during the development of Mercury in the last year or so,
I have somehow managed to introduce a significant memory leak into
the program. A "memory leak" happens when I ask the system for a
piece of memory I can use, and then for whatever reason, do not
return it when I have finished (in other words, it's a bug).


Memory leaks are always hard to track down, and almost every program
on the market is likely to have a few; usually, they don't actually
matter that much, especially for programs that get run for a task
then quit: even a few megabytes of memory, while it sounds like a
lot, is actually pretty insignificant on a modern Windows system.
In a system like Mercury, however, where the program is intended
to run for months on end without ever exiting, quite small memory
leaks can build up over time to become major issues, as in this
case.


The process of finding a memory leak is (and I hate to use such a
tired old cliche) like finding the proverbial needle in a haystack:
Mercury consists of hundreds of thousands of lines of code, and
tracking down the one line where I don't deallocate a piece of
memory is painstaking and requires a unique kind of patience.


In the end, I have decided to re-engineer some of my core libraries
to record much more statistical information internally - this should
allow me to track down more easily where the leak is actually
happening, but also requires a lot of work I wouldn't normally
expect to have to do. That said, once it's done, it will be useful
for the remaining life of the code, in helping me track other
leaks if they occur, but also for optimizing the code and making
it run more efficiently.


WinPMail has rather taken a back seat because of the Mercury problem,
but once the leak is squashed, I'll be moving into the process of
wiring in a lot of the new code I've written for WinPMail over the
last couple of years, starting with the new contact manager (the
replacement for the absolutely ancient addressbook system) - you can
expect to see references to that, and early betas of it as the year
progresses.


That's about all for now - again, sorry for the poor communication:
with so much going on, it's sometimes easy to fall into bad old habits
and push the updates to the side for a while, but I absolutely need
to be a bit more self-disciplined about that.


Until next time,


Cheers!


-- David --


Sorry for the silence in recent times - I've definitely fallen behind on my promises of monthly updates. In this case, the main reason I haven't posted much is because I've been working on just a single problem for a number of months now. At some point during the development of Mercury in the last year or so, I have somehow managed to introduce a significant memory leak into the program. A "memory leak" happens when I ask the system for a piece of memory I can use, and then for whatever reason, do not return it when I have finished (in other words, it's a bug). Memory leaks are always hard to track down, and almost every program on the market is likely to have a few; usually, they don't actually matter that much, especially for programs that get run for a task then quit: even a few megabytes of memory, while it sounds like a lot, is actually pretty insignificant on a modern Windows system. In a system like Mercury, however, where the program is intended to run for months on end without ever exiting, quite small memory leaks can build up over time to become major issues, as in this case. The process of finding a memory leak is (and I hate to use such a tired old cliche) like finding the proverbial needle in a haystack: Mercury consists of hundreds of thousands of lines of code, and tracking down the one line where I don't deallocate a piece of memory is painstaking and requires a unique kind of patience. In the end, I have decided to re-engineer some of my core libraries to record much more statistical information internally - this should allow me to track down more easily where the leak is actually happening, but also requires a lot of work I wouldn't normally expect to have to do. That said, once it's done, it will be useful for the remaining life of the code, in helping me track other leaks if they occur, but also for optimizing the code and making it run more efficiently. WinPMail has rather taken a back seat because of the Mercury problem, but once the leak is squashed, I'll be moving into the process of wiring in a lot of the new code I've written for WinPMail over the last couple of years, starting with the new contact manager (the replacement for the absolutely ancient addressbook system) - you can expect to see references to that, and early betas of it as the year progresses. That's about all for now - again, sorry for the poor communication: with so much going on, it's sometimes easy to fall into bad old habits and push the updates to the side for a while, but I absolutely need to be a bit more self-disciplined about that. Until next time, Cheers! -- David --
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft