Re: [eigen] alloca on MSVC |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] alloca on MSVC
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Fri, 5 Mar 2010 14:30:36 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=2ZLoB86YWIzivXTkLfblptiUU9CVnFPL+GJXKoS/RUE=; b=PIJzOLbjjorG4uEaQYNIiX6jXtZ5j6Rwhm067hR/0CpWBoAE3lmOuyF9NqJXRHStdK E9bdjPVPYUhyc5oHrsSloHK/snc6IJlfXhq78nhS50Pfk3RUWJLU5tiuJraOadoAugcM hEcDn5ts/ZnE5oOENyeX6Z/J3VAdg0OsfJGpg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Cv9z/gHysUCiX4W/pBEQbH8iLEJDdslGx4I9wMpBdyqDucsAxRbKVzCzOJAfsdrfEw WlIVldpmfRLQ+bkxpTkMxz6Rrna+zekyLzLZ8FhMZEAdwHGsi+SwKAlyV3utv+PUAAKD NkfcJ2zMv96k/8rWCFsqOmShroWCW1KPoh1MI=
2010/3/5 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
> I quickly looked into _malloca.
>
> First, MSVC is using it's own threshold for choosing between heap and
> stack allocation. It is defined by _ALLOCA_S_MARKER_SIZE which is set
> to 1024. We could use _alloca to be able to use Eigen's threshold
> (20k) though this function is declared as deprecated. On the other
> hand side MSVC is using _alloca internally.
>
> While looking into this, I also stumbled over something strange in
> Memory.h. There the definition of ei_aligned_stack_delete contains a
> do {} while(0) loop - why?
Trick to group multilpe statements like a {...} so you can use this
macro after a if(), while still requiring the user to not forget the
semicolon (;).
>
> I am also getting stack corruptions in product_notemporary but
> hopefully I can fix that tomorrow, right now I am in a hurry.
>
> - Hauke
>
>
>