1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

Make memset in calloc a tail call.

This commit is contained in:
Ondřej Bílka
2013-11-28 12:03:28 +01:00
parent 2ddb48d376
commit 897b98ba4d
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2013-11-28 Ondřej Bílka <neleai@seznam.cz>
* malloc/malloc.c (__libc_calloc): Make memset a tail call.
2013-11-26 Uros Bizjak <ubizjak@gmail.com> 2013-11-26 Uros Bizjak <ubizjak@gmail.com>
* soft-fp/op-4.h (_FP_FRAC_ASSEMBLE_4): Check rsize against * soft-fp/op-4.h (_FP_FRAC_ASSEMBLE_4): Check rsize against

View File

@ -3181,7 +3181,7 @@ __libc_calloc(size_t n, size_t elem_size)
if (chunk_is_mmapped (p)) if (chunk_is_mmapped (p))
{ {
if (__builtin_expect (perturb_byte, 0)) if (__builtin_expect (perturb_byte, 0))
MALLOC_ZERO (mem, sz); return MALLOC_ZERO (mem, sz);
return mem; return mem;
} }
@ -3203,7 +3203,7 @@ __libc_calloc(size_t n, size_t elem_size)
assert(nclears >= 3); assert(nclears >= 3);
if (nclears > 9) if (nclears > 9)
MALLOC_ZERO(d, clearsize); return MALLOC_ZERO(d, clearsize);
else { else {
*(d+0) = 0; *(d+0) = 0;