/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
{
// Update heapinfo about the heapinfo pages (!):
xbt_assert((uintptr_t) mdp->heapinfo % BLOCKSIZE == 0);
{
// Update heapinfo about the heapinfo pages (!):
xbt_assert((uintptr_t) mdp->heapinfo % BLOCKSIZE == 0);
malloc_info* newinfo = (malloc_info*)align(mdp, newsize * sizeof(malloc_info));
memcpy(newinfo, oldinfo, mdp->heapsize * sizeof(malloc_info));
malloc_info* newinfo = (malloc_info*)align(mdp, newsize * sizeof(malloc_info));
memcpy(newinfo, oldinfo, mdp->heapsize * sizeof(malloc_info));
memset((char*) newinfo + mdp->heapsize * sizeof(malloc_info), 0,
(newsize - mdp->heapsize)* sizeof(malloc_info));
memset((char*) newinfo + mdp->heapsize * sizeof(malloc_info), 0,
(newsize - mdp->heapsize)* sizeof(malloc_info));
back the memory of big blocks to the system before reallocating them: we don't
want to loose the beginning of the area when this happens */
void *mmalloc_no_memset(xbt_mheap_t mdp, size_t size)
back the memory of big blocks to the system before reallocating them: we don't
want to loose the beginning of the area when this happens */
void *mmalloc_no_memset(xbt_mheap_t mdp, size_t size)