]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Remove a duplicate comment.
authorMansour Moufid <mansourmoufid@gmail.com>
Sun, 19 Oct 2014 16:59:28 +0000 (12:59 -0400)
committerNick Mathewson <nickm@torproject.org>
Sun, 2 Nov 2014 16:54:42 +0000 (11:54 -0500)
src/common/util.c

index 6e30c47bf9e99a7155170ed0990916d30bbb799b..013a501dbc8e15c1db6a6a559f03f4dd881a529d 100644 (file)
@@ -212,12 +212,6 @@ size_mul_check(const size_t x, const size_t y)
 void *
 tor_calloc_(size_t nmemb, size_t size DMALLOC_PARAMS)
 {
-  /* You may ask yourself, "wouldn't it be smart to use calloc instead of
-   * malloc+memset?  Perhaps libc's calloc knows some nifty optimization trick
-   * we don't!"  Indeed it does, but its optimizations are only a big win when
-   * we're allocating something very big (it knows if it just got the memory
-   * from the OS in a pre-zeroed state).  We don't want to use tor_malloc_zero
-   * for big stuff, so we don't bother with calloc. */
   tor_assert(size_mul_check(nmemb, size));
   return tor_malloc_zero_((nmemb * size) DMALLOC_FN_ARGS);
 }