You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@wandisco.com> on 2011/02/11 13:20:02 UTC

Re: svn commit: r1069743 - /subversion/trunk/subversion/libsvn_subr/svn_string.c

On Fri, 2011-02-11, ivan@apache.org wrote:
> URL: http://svn.apache.org/viewvc?rev=1069743&view=rev
> Log:
> Optimize svn_string_t creation by allocating memory for svn_string_t 
> structure and data in one chunk.
> 
> * subversion/libsvn_subr/svn_string.c
>   (svn_string_ncreate): Allocate memory for svn_string_t and data in one 
>    chunk.

Nice optimization!

- Julian



Re: svn commit: r1069743 - /subversion/trunk/subversion/libsvn_subr/svn_string.c

Posted by Philip Martin <ph...@wandisco.com>.
Julian Foad <ju...@wandisco.com> writes:

> On Fri, 2011-02-11, ivan@apache.org wrote:
>> URL: http://svn.apache.org/viewvc?rev=1069743&view=rev
>> Log:
>> Optimize svn_string_t creation by allocating memory for svn_string_t 
>> structure and data in one chunk.
>> 
>> * subversion/libsvn_subr/svn_string.c
>>   (svn_string_ncreate): Allocate memory for svn_string_t and data in one 
>>    chunk.
>
> Nice optimization!

It does save a function call, but the memory pools mean that there is no
memory saving.  It's probably more of an optimization when pool
debugging is enabled :)

-- 
Philip