Having recently started a new job, I’ve been deliberately taking some time to build up my development environment to be just right. Over the past six or so years I’ve figured out what’s the easiest way to do X, or the fastest way to do Y, and I’ve carried these things from job to job. I’ve spent a while tuning my dot-emacs file so that most of my common tasks are automated, and I’ve turned into a “three strikes and you automate” bunny.
Anyhow, I’ve been doing a lot of heap related work, and the MSDN docs aren’t great. So, I finally got round to writing the article which I wish I’d wrote years ago …
It’s obscure! It’s of interest to about 3 people in the world! It’s the … Win32 Debug CRT Heap Internals guide!
(but it means I’ll always know where to find the information, so I’m happy. And it’s always fun indulging in a bit of low-level hackery rather than always using high-level languages which protect you from this stuff)
Next week, I’ll write another article on how to pinpoint heap corruption (writes through dangling pointers etc) using only DevStudio (no Purify or Boundchecker required).
I can’t over-emphasis how good nxml-mode is. I’m using it for all my xml/xhtml stuff now. I couldn’t be without it.
On another track completely, I’ve been doing a lot of thinking about physics recently. I’m trying to relearn electromagnetism from the ground up. I remember reading that Richard Feynman once did this exercise – taking your knowledge to bits, examining all the parts, and carefully putting it back together. I am really appalled at how poor my understanding of this subject it. I did physics up to 2nd year at Uni, and always got top grades. Yet, I have ended up with a facade of understanding. This page convinced me that I wasn’t crazy after all. I think it should be possible to write a simple electromagnetism “simulator” which operates at the level of individual electrons, and only knows a small number of rules (Maxwells laws), but yet is able to recreate pretty much all electromagnetic phenomena. Sure, it’ll be slow but I hope it will be able to demonstrate basically all electromagnetic phenomena.
4 replies on “Debug Win32 Heap Internals”
I have the impression you have always employed “n strikes and you automate” for smaller values of n than most bunnies, Andrew. But congratulations on reducing it to three.
Likewise, I think, re the size of audience for your article. I have a translated vision of dnt reading the blog entry and trying to figure out who the other person is.
Heh, three must be the magic number meaning roughly “Me, the other bloke I know, and well … there /must/ be someone else surely?”. 😉
It’s not that long since I read Refactoring, so I automate on the third time too. Honest.
The Refactoring book annoys me. While it contains lots of useful advice, it is mostly a mechanical description of how to transform source code. Mechanical description? Transforming data? Isn’t that what computers are meant to do for us!
Hey, at least it made refactoring sexy and socially acceptable. That’s the biggest benefit of XP too, I think. It made unit tests sexy. Post-XP, you can say “Yeah, I’m writing tests” and sound cool.