mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
* malloc/malloc.c (public_cALLOc): We cannot skip the memory
clearing if perturb_byte != 0.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2005-03-20 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* malloc/malloc.c (public_cALLOc): We cannot skip the memory
|
||||||
|
clearing if perturb_byte != 0.
|
||||||
|
|
||||||
2005-03-20 Jakub Jelinek <jakub@redhat.com>
|
2005-03-20 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* posix/bits/unistd.h (pread) [__USE_FILE_OFFSET64]: Use __off64_t
|
* posix/bits/unistd.h (pread) [__USE_FILE_OFFSET64]: Use __off64_t
|
||||||
|
@ -3691,14 +3691,14 @@ public_cALLOc(size_t n, size_t elem_size)
|
|||||||
|
|
||||||
/* Two optional cases in which clearing not necessary */
|
/* Two optional cases in which clearing not necessary */
|
||||||
#if HAVE_MMAP
|
#if HAVE_MMAP
|
||||||
if (chunk_is_mmapped(p))
|
if (perturb_byte == 0 && chunk_is_mmapped(p))
|
||||||
return mem;
|
return mem;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
csz = chunksize(p);
|
csz = chunksize(p);
|
||||||
|
|
||||||
#if MORECORE_CLEARS
|
#if MORECORE_CLEARS
|
||||||
if (p == oldtop && csz > oldtopsize) {
|
if (perturb_byte == 0 && (p == oldtop && csz > oldtopsize)) {
|
||||||
/* clear only the bytes from non-freshly-sbrked memory */
|
/* clear only the bytes from non-freshly-sbrked memory */
|
||||||
csz = oldtopsize;
|
csz = oldtopsize;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user