Hi,

Thanx for your fast response. Must be going crazy reviewing all these patches 
:-).

1) Thread.h: Hmmm I thought I got the function prototype correctly. Well it 
worked for me. I will have to check with the cvs.
2) OK.
3) Because calloc is undeffed in gwmem.h. If we try to use it it prints 
"do_not_call_calloc_directly". Yet no gw_calloc exists! What's a poor 
programmer to do? :-(. Well you could use malloc + memset (x, 0, n), but then 
so you could in ANSI C, yet calloc exists I suspect it si more performance 
related rather than simplicity. It is a normal C function, and I don't the 
reason to undef it without giving its counterpart.

Let me know if it is OK with calloc, so that I can submit it together with 
strdup.

BR,
Nikos
  ----- Original Message ----- 
  From: Alexander Malysh 
  To: Nikos Balkanas 
  Cc: [email protected] 
  Sent: Friday, April 03, 2009 12:21 AM
  Subject: Re: gwmem patches


  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>

Reply via email to