digitalmars.D - Using alloca?
- Maxime Chevalier-Boisvert (3/3) Jun 27 2013 I'd like to stack-allocate an array that will be dynamically
- Andrei Alexandrescu (3/6) Jun 27 2013 Yah, import core.stdc.stdlib.
- Maxime Chevalier-Boisvert (3/11) Jun 28 2013 Thank you good sir :)
- Marco Leise (8/11) Jun 28 2013 Am Fri, 28 Jun 2013 06:42:31 +0200
- Benjamin Thaut (8/11) Jun 28 2013 The last time I checked alloca did not work well together with
- bearophile (4/9) Jun 28 2013 Is this in Bugzilla?
- Benjamin Thaut (6/14) Jun 28 2013 Yes, its a pretty old bug too:
I'd like to stack-allocate an array that will be dynamically sized. Is alloca somewhere in the standard D library? If so, what should I import to have access to it?
Jun 27 2013
On 6/27/13 9:42 PM, Maxime Chevalier-Boisvert wrote:I'd like to stack-allocate an array that will be dynamically sized. Is alloca somewhere in the standard D library? If so, what should I import to have access to it?Yah, import core.stdc.stdlib. Andrei
Jun 27 2013
On Friday, 28 June 2013 at 05:27:54 UTC, Andrei Alexandrescu wrote:On 6/27/13 9:42 PM, Maxime Chevalier-Boisvert wrote:Thank you good sir :)I'd like to stack-allocate an array that will be dynamically sized. Is alloca somewhere in the standard D library? If so, what should I import to have access to it?Yah, import core.stdc.stdlib. Andrei
Jun 28 2013
Am Fri, 28 Jun 2013 06:42:31 +0200 schrieb "Maxime Chevalier-Boisvert" <maximechevalierb gmail.com>:I'd like to stack-allocate an array that will be dynamically sized. Is alloca somewhere in the standard D library? If so, what should I import to have access to it?As a side note, in Mono-D you can just type alloca, then press Ctrl+Alt+Space and the correct import magically appears at the top of the source file. -- Marco
Jun 28 2013
Am 28.06.2013 06:42, schrieb Maxime Chevalier-Boisvert:I'd like to stack-allocate an array that will be dynamically sized. Is alloca somewhere in the standard D library? If so, what should I import to have access to it?The last time I checked alloca did not work well together with execptions. Whenever a exception whas thrown thourgh a stack frame which used alloca the app would crash. (on dmd Windows 64 bit, which uses the same exception mechanism as the linux versions of dmd) -- Kind Regards Benjamin Thaut
Jun 28 2013
Benjamin Thaut:The last time I checked alloca did not work well together with execptions. Whenever a exception whas thrown thourgh a stack frame which used alloca the app would crash. (on dmd Windows 64 bit, which uses the same exception mechanism as the linux versions of dmd)Is this in Bugzilla? Bye, bearophile
Jun 28 2013
Am 28.06.2013 20:01, schrieb bearophile:Benjamin Thaut:Yes, its a pretty old bug too: http://d.puremagic.com/issues/show_bug.cgi?id=3753 -- Kind Regards Benjamin ThautThe last time I checked alloca did not work well together with execptions. Whenever a exception whas thrown thourgh a stack frame which used alloca the app would crash. (on dmd Windows 64 bit, which uses the same exception mechanism as the linux versions of dmd)Is this in Bugzilla? Bye, bearophile
Jun 28 2013