Re: gwmem patches

Alexander Malysh <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi Nikos,

we have at least one +1 so please repost your patch.

Thanks,
Alex

Am 03.04.2009 um 17:37 schrieb Andreas Fink:

> I'm +1 on gw_calloc. There's a few times I would have used it in the  
> past so its nice to have it in gwlib.
>
> I see very little optimisation of strdup except we do a strlen twice  
> (once explicit in the malloc line an done implicity in the strcpy)  
> but it is never bad to save a few microseconds.. (who knows one  
> might call this one a gazillion times...). so +1 for that one too.
>
>
> On 02.04.2009, at 23:21, Alexander Malysh wrote:
>
>> Hi,
>>
>> thanks for your patch but:
>>
>> 1) thread.h patch was wrong. I fixed it in CVS.
>> 2) gw_strdup optimisation looks OK, please submit as extra patch
>> 3) gw_calloc, hmm... I don't really see any advantage of this one.  
>> because
>> 	x = gw_malloc(count*size);
>> 	memset(x, 0);
>>     do the same. why do we need this?
>>
>> Thanks,
>> Alex
>>
>> Am 02.04.2009 um 19:09 schrieb Nikos Balkanas:
>>
>>> Hi,
>>>
>>> An assortment of small patches to make check_memory_leaks work  
>>> better:
>>>
>>> 1) Added support for gw_calloc, which is #undefed but not defined
>>> 2) Replaced strcpy with memcpy in gw_strdup for better efficiency
>>> 3) Added function prototype in thread.h for mutex_make_measured so  
>>> that MUTEX_STATS compile correctly.
>>>
>>> Please decide and vote.
>>>
>>> BR,
>>> Nikos<kannel.diff>
>>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.