Welcome to MSDN Blogs Sign in | Join | Help

September 2007 - Posts

ICorDebugFunction is 1:1 with the IL

In CLR 1.0, there was a simple invariant between IL code blob, and native code blob. It was either 1:0 if the code wasn't jitted, or 1:1 if it was. Method tokens (module scope, mdMethodDef) were also 1:1 with the IL blobs. 1:1 is a nice relationship.

"Drawn to Life" and framework design

" Drawn to Life ", is a Nintendo DS game that lets you draw various objects in the game, such as the hero, platforms, etc. It's cute, but more importantly, it also demonstrates a key part of good framework design, which is what I'm writing about here.
Posted by jmstall | 0 Comments

Interop-debugging fails when using more than 63 TLS slots

Here's a Public Service Announcement: Interop-debugging may hang if the debuggee uses more than 63 native Thread Local-Storage slots and then loads the CLR. KB939969 has more details, including three workarounds. This is fixed in Orcas, so only applies

What I'm reading now: 50 Rules Kids Won't Learn in School

I'm currently reading " 50 Rules Kids Won't Learn in School " by Charles J. kes. (Apparently the first 10 or 14 have been popular as spam mails wrongfully attributed to Bill Gates ). The advice is essential for kids entering the workforce. The target
Posted by jmstall | 2 Comments
Filed under:

(A==B)==(X==Y)

I used to hate the expression: (A==B)==(X==Y), but I've grown very fond of it. My prior feelings of contempt stem from my desire to avoid obscure language features. But I figure when properly parenthesized, this isn't so obscure and can be pretty useful
Posted by jmstall | 3 Comments
Filed under:

Paradigms around Debugging Memory leaks

In native code, memory is explicitly managed by the program calling Malloc()/Free() (or comparable APIs). In managed code, there's a garbage collector (GC). A GC does not mean that you no longer get memory leaks . It just means that runtime calls Free()
Posted by jmstall | 2 Comments
Filed under:

Foreach codegen

Do you know how the following C# code compiles? foreach ( int i in c) { Console .WriteLine(i); } In addition to the obvious branching opcodes, this can also emit try/finally, a call to IDisposable, unboxing opcodes. It turns out it really depends on the
Posted by jmstall | 5 Comments
Filed under: ,

Feature Parity vs. Scenario Parity

It can be easy to miss the forest through the trees. Sometimes there are emergent properties from the individual feature items, which in turn provide some new "implicit" feature to the end-user. Such features can lead to very useful end-user scenarios,
Posted by jmstall | 2 Comments
Filed under:
 
Page view tracker