[En-Nut-Discussion] Per thread Memory Management

Moritz Struebe morty at gmx.net
Thu Apr 17 17:04:36 CEST 2008


Hi there,

I'm now starting to assign memory to a thread. Some really cool things 
can be done with this. Like finding memoryleaks. The option of killing 
theads, etc.
I have a coding style question. As I'll need quite a few ifdefs I see 
two options:
1) The common way: Use ifdefs.
2) Use a local variable. Assine 0 or 1 to it by ifdef. The Compiler then 
removes the variable and the unused code. Probably this is possible with 
a static global, too, but I'm not sure. I have to test that first.

The latter has the advantage of better to read code and the disadvantage 
of bigger code if something is wrong during the optimization process.

What do you guys think?

Cheers
Morty



More information about the En-Nut-Discussion mailing list