[En-Nut-Discussion] Per thread Memory Management

Harald Kipp harald.kipp at egnite.de
Thu Apr 17 17:59:56 CEST 2008


Hi Moritz,

Moritz Struebe wrote:
> 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.

http://www.ethernut.de/en/documents/programming-style-guide.html
contains some hints and a link to a document "#ifdef considered harmful".

Anyway, like anybody else I'm often in conflict between readability and 
optimal code. However, if there's no other solution than to hope for the 
optimizer doing it right, I'd prefer #ifdef.

Harald






More information about the En-Nut-Discussion mailing list