|Re: [eigen] portable reallocation...|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] portable reallocation...
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Sat, 27 Feb 2010 17:49:28 -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 :content-transfer-encoding; bh=sbjHOx7DBaXcqdA7OUZ000rKuzx2l+n+XD9SQVIygQg=; b=ZsCWi8tU0BXwyC2++zn/LWz51DhJwmtPJ5SWq9S8QO3b2Hub++wjNlxs7QDf2rO0N9 aNgNDtCftYT5+fCZqcbL4b2fMm4rAWMxddVeFZ5a/R1StP3Q1V9FJowaAe/PL7+vdt2X Jh3FLoma/qJO1blktZOzMunl8qdSM0vYjKgWY=
- 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:content-transfer-encoding; b=qPpnIm7tZC4sUh4siZPuM7TQ5Ris7j5j0SxWkuiW75v/JUkGR3dHuCgQ2wYtzO6sbn 0VaMhWUHePnvC03S8ffsBbIGS/IhwgEEha5ZNrPDmi5qyZpjaUgMVP/rRrTeDkSnxJcm k+hHIvba03gL23Nz/YM00GNtfTYY+R7AZ8ZE0=
Thanks, good catch.
2010/2/27 Eamon Nerbonne <emn13@xxxxxxxxxxxx>:
> Hi all,
> Minor nitpick, in Memory.h line 100 ei_mm_alloc is missing an inline
> keyword; I'm seeing "multiple definition" errors.
> --eamon@xxxxxxxxxxxx - Tel#:+31-6-15142163
> On Sat, Feb 27, 2010 at 17:40, Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
>> On Sat, Feb 27, 2010 at 4:26 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
>> > You patch looks good globally.
>> > A few comments:
>> > 1)
>> > + // Comment from Hauke: IIRC, 'if (ptr)' is not required - you are
>> > free to call free(0)
>> > if(ptr)
>> > std::free(*(reinterpret_cast<void**>(ptr) - 1));
>> > but if ptr==0 then here we're dereferencing the 0 pointer, that's
>> > what's illegal. It's precisely to allow to do ei_aligned_free(0) that
>> > we have to do this if(ptr) here.
>> I should have seen the -1 ... it is crystal clear that this does not work.
>> > 2)
>> > Naming nitpicks:
>> > conservative_resize: I actually agree that it looks better than
>> > conservativeResize, but we have this convention about capitalization,
>> > and following it consistently has the merit of making it easier for
>> > the user to remember the names.
>> > eigen_mm_realloc: why not ei_mm_realloc ? like elsewhere in eigen.
>> > 3)
>> > Finally: is this well covered by existing unit tests? (Just checking)
>> All done and I think this test has full coverage.
>> - Hauke