[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17435] trunk/blender/source/blender: 2 utility functions added for projection painting.

Campbell Barton ideasman42 at gmail.com
Thu Nov 13 04:58:20 CET 2008


On Thu, Nov 13, 2008 at 12:45 PM, Martin Poirier <theeth at yahoo.com> wrote:
>
>
>
> --- On Wed, 11/12/08, Brecht Van Lommel <brecht at blender.org> wrote:
>
>> From: Brecht Van Lommel <brecht at blender.org>
>> Subject: Re: [Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17435] trunk/blender/source/blender: 2 utility functions added for projection painting.
>> To: "bf-blender developers" <bf-committers at blender.org>
>> Date: Wednesday, November 12, 2008, 8:13 PM
>> On Wed, 2008-11-12 at 21:52 -0200, José Ignacio wrote:
>> > 2008/11/12 Martin Poirier <theeth at yahoo.com>:
>> > >
>> > > --- On Wed, 11/12/08, Campbell Barton
>> <ideasman42 at gmail.com> wrote:
>> > >
>> > >> Log Message:
>> > >> -----------
>> > >> 2 utility functions added for projection
>> painting.
>> > >> * BLI_linklist_index() - to get an items
>> index in a
>> > >> LinkList
>> > >
>> > >
>> > > That's what BLI_findindex() does.
>> > >
>> > > Martin
>> > >
>> > D'oh?
>> >
>>
>> Not really, Linklist is not ListBase.
>
> Right, my bad.
>
> Martin


instead you could have noticed that BLI_memarena_use_malloc() and
BLI_memarena_use_calloc() are not very useful since switching to
BLI_memarena_use_calloc() after BLI_memarena_use_malloc() wont ensure
your the next BLI_memarena_new'd memory is calloc'd since the buffer
could have been allocated when malloc was being used.

If we want to give options for memarena to calloc or malloc,
BLI_memarena_new should take an argument for this. Setting calloc
should run memset(.., 0, ...) on the malloc'd buffer so further calls
BLI_memarena_alloc would be zero'd.

At this point Im not interested enough to add, verify it works
properly + argue the speed difference between malloc vs calloc on
different os's
...any knit pickers out there feel like it? :)


More information about the Bf-committers mailing list