Partager via


Reserved fields

Via Larry Osterman's recent series on concurrency, I ran across an older post from Raymond Chen on why you shouldn't use reserved fields in internal Windows data structures.

About ten years ago, when I was working on the QuickTime team at Apple, we got a report from a beta tester about some third-party application that was completely broken with the new version of QuickTime. Several hours of debugging in MacsBug later, I discovered that the problem came from that application using a reserved field in the heap data structures. In that version of QuickTime, we had included a patch to the memory manager to work around a problem in older OS versions. That patch needed to use the reserved field, which obviously conflicted with the third party app's use of that field.

When I sent the vendor an email about this, the response came back: "But you can't use that field; it's reserved!"

Umm ... yes.

Comments