Archive for the ‘Wish List’ Category.

Wanted: live leak detection for FastMM

One of the awesome things about FastMM is FullDebugMode.  Its features pretty much make memory leaks trivial to track down… usually.  But if you’ve got the classic problem of code creating objects and placing them in a container somewhere and then abandoning them, you can have a huge memory leak in your program without it ever being detected, just as long as the container gets properly cleaned up before the program shuts down.

Seems to me that it should be possible to detect this with a bit of instrumenting, though.  Here’s the basic idea. Continue reading ‘Wanted: live leak detection for FastMM’ »

Wish list: Slicing syntax

I’ve been doing a lot of string processing work lately.  Delphi has a lot of strengths, but unfortunately string manipulation really isn’t one of them.  It gets really messy really quickly if you’re trying to do anything complicated.  Extracting substrings out of strings quickly degenerates into a mess of difficult-to-read Copy calls.  It would sure be nice if there was a better way. Continue reading ‘Wish list: Slicing syntax’ »

Wish list: Generics collapsing

One annoying thing I’ve noticed in building my script compiler is the way the use of generic collections tends to bloat up the size of your EXE.  I use generics for a lot of things; a compiler uses lists, stacks and lookup tables (dictionaries) all over the place.  When I was building it with DeHL, the compiler plus a very simple test frontend compiled into a 36 MB behemoth of a binary, and a quick look at the mapfile shows that the vast majority of that was DeHL collections.  Now that I’ve switched to the more simplified Collections library, it “only” takes 23 MB, a savings of about 33%.  But that’s still huge.  There has to be a better way.

Continue reading ‘Wish list: Generics collapsing’ »