memset (mi, '\0', sizeof (struct mallinfo));
malloc_update_mallinfo(arena *ar_ptr, struct mallinfo *mi)#elsemalloc_update_mallinfo(ar_ptr, mi) arena *ar_ptr; struct mallinfo *mi;#endif{  int i, navail;  mbinptr b;  mchunkptr p;#if MALLOC_DEBUG  mchunkptr q;#endif  INTERNAL_SIZE_T avail;  (void)mutex_lock(&ar_ptr->mutex);  avail = chunksize(top(ar_ptr));  navail = ((long)(avail) >= (long)MINSIZE)? 1 : 0;  for (i = 1; i < NAV; ++i)  {    b = bin_at(ar_ptr, i);    for (p = last(b); p != b; p = p->bk)    {#if MALLOC_DEBUG      check_free_chunk(ar_ptr, p);      for (q = next_chunk(p);           q != top(ar_ptr) && inuse(q) && (long)chunksize(q) > 0;           q = next_chunk(q))        check_inuse_chunk(ar_ptr, q);#endif      avail += chunksize(p);      navail++;    }  }  mi->arena = ar_ptr->size;  mi->ordblks = navail;  mi->uordblks = ar_ptr->size - avail;  mi->fordblks = avail;  mi->hblks = n_mmaps;  mi->hblkhd = mmapped_mem;  mi->keepcost = chunksize(top(ar_ptr));  (void)mutex_unlock(&ar_ptr->mutex);}