pike.git / src / malloc.c

version» Context lines:

pike.git/src/malloc.c:3961:    if (mem == 0)    return 0;       if (PREACTION(m)) return 0;    p = mem2chunk(mem);    remainder_size = chunksize(p);       assert(!is_mmapped(p));       if (opts & 0x2) { /* optionally clear the elements */ -  memset((size_t*)mem, 0, remainder_size - SIZE_T_SIZE - array_size); +  memset(mem, 0, remainder_size - SIZE_T_SIZE - array_size);    }       /* If not provided, allocate the pointer array as final part of chunk */    if (marray == 0) {    size_t array_chunk_size;    array_chunk = chunk_plus_offset(p, contents_size);    array_chunk_size = remainder_size - contents_size;    marray = (void**) (chunk2mem(array_chunk));    set_size_and_pinuse_of_inuse_chunk(m, array_chunk, array_chunk_size);    remainder_size = contents_size;