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

Expand MALLOC_COPY and MALLOC_ZERO to memcpy and memset.

This commit is contained in:
Ondřej Bílka
2013-12-10 19:36:28 +01:00
parent 5782a80f9f
commit 0dfa665cc1
3 changed files with 14 additions and 19 deletions

View File

@ -330,7 +330,7 @@ realloc_check(void* oldmem, size_t bytes, const void *caller)
if (top_check() >= 0)
newmem = _int_malloc(&main_arena, bytes+1);
if (newmem) {
MALLOC_COPY(newmem, oldmem, oldsize - 2*SIZE_SZ);
memcpy(newmem, oldmem, oldsize - 2*SIZE_SZ);
munmap_chunk(oldp);
}
}