[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: [eigen] alloca on MSVC
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Fri, 5 Mar 2010 18:43:00 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=2bLIfWhPtnCU6kYKHeFxx+fi7SbfhL01NZEeN4ECIbY=; b=tyXelcd3GKdlf96yAlqu3yWK4YmmBZNPiLQH4ruDG8Z6OLixmtByLxlZZ9mp0wt5rZ xypwoYm+xl/7TyobWi8zZ9e52GgmF+A5IljSKUcbIVVIr8KZ86A+0yxgtYdVIfSguqKk m5TrDLXqyMda6fTfbfrV7PlJuomE/+NwlEMyA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=lWIqUERacJ5lwfTzQA9DL1S0IlzMVL9HnASG01JCr4HbTXankfY+V78wGWvFhUvkDd ZnYx7Jx87+RsJ0yh5m6Fi8I9bxmMBTe1rH/AJn1iR0RGIk1bEp5d2CU0tkJcDGnCTJon GcNfbnLVoF9ztbt4pp07uXpDJ/2mkOiekpArA=
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?
I am also getting stack corruptions in product_notemporary but
hopefully I can fix that tomorrow, right now I am in a hurry.
- Hauke