return __mmalloc_default_mdp;
}
-
-// This is the underlying implementation of mmalloc_get_bytes_used_remote.
-// Is it used directly in order to evaluate the bytes used from a different
-// process.
-size_t mmalloc_get_bytes_used_remote(size_t heaplimit, const malloc_info* heapinfo)
-{
- int bytes = 0;
- for (size_t i=0; i < heaplimit; ++i){
- if (heapinfo[i].type == MMALLOC_TYPE_UNFRAGMENTED){
- if (heapinfo[i].busy_block.busy_size > 0)
- bytes += heapinfo[i].busy_block.busy_size;
- } else if (heapinfo[i].type > 0) {
- for (size_t j=0; j < (size_t) (BLOCKSIZE >> heapinfo[i].type); j++){
- if(heapinfo[i].busy_frag.frag_size[j] > 0)
- bytes += heapinfo[i].busy_frag.frag_size[j];
- }
- }
- }
- return bytes;
-}