Re: [eigen] patch to throw std::bad_alloc |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] patch to throw std::bad_alloc
- From: "Benoit Jacob" <jacob.benoit.1@xxxxxxxxx>
- Date: Tue, 16 Dec 2008 19:01:58 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=plE9lcXi1KM2usVan1Y2yoycmIqgPga1RMHY3ylRkOg=; b=MGfxXRtGT9Cstwd8zERh9pNq866NmHpYNYxk5WsCXbhZFBHaQ+83fGTQsUizdxVPOU khb7ucq0k49nAXkOxN3E2MvLtc4+OZvxw6gSPNsYss9gBQz9BkMHo+4hI/QfB5dtqe3x 1mSJaahf4nbeRaP6FYAfJpdOGuHrOfN+XThTY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=Pr22sPE/lqieYrraX5hccF2OjcESSmUTDsV5IKIodgO+aOtYyRyiSOD1IkNA4LBppw 1L7kTYjF5K2Y6w841OeNDj6Awq3kQckF3dcKWKMzzWIhGm/cfKKpE+x78bUn2D6mOpmC X5Wav2aOInn6O/BXC/96tAvIVoLEjFmfar/Ms=
2008/12/16 Kenneth Riddile <kfriddile@xxxxxxxxx>:
> "The alloca() function is machine and compiler dependent. On many systems its implementation is buggy. Its use is discouraged."
>
> I know you said you're only using it on *nix platforms, which is good, because the Microsoft alloca() behaves a lot differently than the GCC implementation in that it DOES throw an implementation-defined exception. Something to think about, but, if I can disable it, then that's good enough for me.
Actually we're more restrictive than that, we use alloca() only on
Linux, where it is fine. I've heard that alloca() is buggy even on
many other unix platforms.
> Ah, yes, that was unintentional and simply a result of different coding styles. I'm more used to wrapping the contents of a file in the appropriate namespace blocks instead of wrapping the #include since it simplifies maintenance (reduces unintentional namespace pollution and ensures that moving an #include doesn't subtly alter the meaning of that file's contents).
Sure, Eigen is just very special in this respect since so much code is
in headers. The current scheme reduces a lot the amount of namespace{}
statements and centralizes them all in a single place, the public
headers.
Cheers,
Benoit
---