<html><head><style data-externalstyle="true">
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
}

p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst, p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle, p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
line-height:115%;
}
</style></head><body><div data-externalstyle="false" style="font-family:Calibri,'Segoe UI',Meiryo,'Microsoft YaHei UI','Microsoft JhengHei UI','Malgun Gothic','Khmer UI','Nirmala UI',Tunga,'Lao UI',Ebrima,sans-serif;font-size:16px;"><div>If you do use it, only do so sparingly and for allocations of no more than a few hundred bytes.</div><div>&nbsp;</div><div><a tabindex="-1" href="http://stackoverflow.com/questions/1018853/why-is-alloca-not-considered-good-practice">http://stackoverflow.com/questions/1018853/why-is-alloca-not-considered-good-practice</a></div><div>&nbsp;</div><div>&nbsp;</div><div data-signatureblock="true">&nbsp;</div>        <div style="border-top-color: rgb(225, 225, 225); border-top-width: 1px; border-top-style: solid;">                <strong>From:</strong>&nbsp;Bradley Lowekamp<br>                <strong>Sent:</strong>&nbsp;‎March‎ ‎12‎, ‎2013 ‎8‎:‎54‎ ‎AM<br>                <strong>To:</strong>&nbsp;&lt;insight-developers@itk.org&gt; Developers<br>                <strong>Subject:</strong>&nbsp;[Insight-developers] Using alloca<br>        </div>        <div>&nbsp;</div>Hello,<br><br>I am thinking about using the "alloca" function in some code I'm working on for ITK, and wonder what other people think of it or others experience...<br><br>From the BSD Library Functions Manual:<br><br>DESCRIPTION<br>&nbsp;&nbsp;&nbsp;&nbsp; The alloca() macro allocates size bytes of space in the stack frame of the caller.&nbsp; This temporary space is automatically freed on return.<br><br>I am planning on using it for some dimension sized array in compiled templateless code, in lieu of C99 dynamic stack based arrays.<br><br>Best as I can tell Windows defines it as _alloca, so a little CMake try compile is going to be needed, not a big deal.<br><br>Thanks,<br>Brad <br>_______________________________________________<br>Powered by www.kitware.com<br><br>Visit other Kitware open-source projects at<br>http://www.kitware.com/opensource/opensource.html<br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://kitware.com/products/protraining.php<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.itk.org/mailman/listinfo/insight-developers<br></div></body></html>