Lines Matching defs:_heapinfo
174 extern malloc_info *_heapinfo;
386 malloc_info *_heapinfo;
446 _heapinfo = (malloc_info *) align (heapsize * sizeof (malloc_info));
447 if (_heapinfo == NULL)
449 memset (_heapinfo, 0, heapsize * sizeof (malloc_info));
450 _heapinfo[0].free.size = 0;
451 _heapinfo[0].free.next = _heapinfo[0].free.prev = 0;
453 _heapbase = (char *) _heapinfo;
455 /* Account for the _heapinfo block itself in the statistics. */
490 memcpy (newinfo, _heapinfo, heapsize * sizeof (malloc_info));
493 oldinfo = _heapinfo;
497 _heapinfo = newinfo;
498 /* Account for the _heapinfo block itself in the statistics. */
569 if (--_heapinfo[block].busy.info.frag.nfree != 0)
570 _heapinfo[block].busy.info.frag.first = (unsigned long int)
601 _heapinfo[block].busy.type = log;
602 _heapinfo[block].busy.info.frag.nfree = i - 1;
603 _heapinfo[block].busy.info.frag.first = i - 1;
618 while (_heapinfo[block].free.size < blocks)
620 block = _heapinfo[block].free.next;
626 block = _heapinfo[0].free.prev;
627 lastblocks = _heapinfo[block].free.size;
635 block = _heapinfo[0].free.prev;
636 _heapinfo[block].free.size += (blocks - lastblocks);
644 _heapinfo[block].busy.type = 0;
645 _heapinfo[block].busy.info.size = blocks;
655 if (_heapinfo[block].free.size > blocks)
659 _heapinfo[block + blocks].free.size
660 = _heapinfo[block].free.size - blocks;
661 _heapinfo[block + blocks].free.next
662 = _heapinfo[block].free.next;
663 _heapinfo[block + blocks].free.prev
664 = _heapinfo[block].free.prev;
665 _heapinfo[_heapinfo[block].free.prev].free.next
666 = _heapinfo[_heapinfo[block].free.next].free.prev
673 _heapinfo[_heapinfo[block].free.next].free.prev
674 = _heapinfo[block].free.prev;
675 _heapinfo[_heapinfo[block].free.prev].free.next
676 = _heapindex = _heapinfo[block].free.next;
680 _heapinfo[block].busy.type = 0;
681 _heapinfo[block].busy.info.size = blocks;
690 _heapinfo[block + blocks].busy.info.size = -blocks;
771 type = _heapinfo[block].busy.type;
777 _bytes_used -= _heapinfo[block].busy.info.size * BLOCKSIZE;
778 _bytes_free += _heapinfo[block].busy.info.size * BLOCKSIZE;
786 i = _heapinfo[i].free.prev;
790 i = _heapinfo[i].free.next;
792 i = _heapinfo[i].free.prev;
796 if (block == i + _heapinfo[i].free.size)
799 _heapinfo[i].free.size += _heapinfo[block].busy.info.size;
805 _heapinfo[block].free.size = _heapinfo[block].busy.info.size;
806 _heapinfo[block].free.next = _heapinfo[i].free.next;
807 _heapinfo[block].free.prev = i;
808 _heapinfo[i].free.next = block;
809 _heapinfo[_heapinfo[block].free.next].free.prev = block;
816 if (block + _heapinfo[block].free.size == _heapinfo[block].free.next)
818 _heapinfo[block].free.size
819 += _heapinfo[_heapinfo[block].free.next].free.size;
820 _heapinfo[block].free.next
821 = _heapinfo[_heapinfo[block].free.next].free.next;
822 _heapinfo[_heapinfo[block].free.next].free.prev = block;
827 blocks = _heapinfo[block].free.size;
834 _heapinfo[_heapinfo[block].free.prev].free.next
835 = _heapinfo[block].free.next;
836 _heapinfo[_heapinfo[block].free.next].free.prev
837 = _heapinfo[block].free.prev;
838 block = _heapinfo[block].free.prev;
856 (_heapinfo[block].busy.info.frag.first << type));
858 if (_heapinfo[block].busy.info.frag.nfree == (BLOCKSIZE >> type) - 1)
868 _heapinfo[block].busy.type = 0;
869 _heapinfo[block].busy.info.size = 1;
879 else if (_heapinfo[block].busy.info.frag.nfree != 0)
890 ++_heapinfo[block].busy.info.frag.nfree;
898 _heapinfo[block].busy.info.frag.nfree = 1;
899 _heapinfo[block].busy.info.frag.first = (unsigned long int)
1106 type = _heapinfo[block].busy.type;
1125 if (blocks < _heapinfo[block].busy.info.size)
1129 _heapinfo[block + blocks].busy.type = 0;
1130 _heapinfo[block + blocks].busy.info.size
1131 = _heapinfo[block].busy.info.size - blocks;
1132 _heapinfo[block].busy.info.size = blocks;
1140 else if (blocks == _heapinfo[block].busy.info.size)
1148 blocks = _heapinfo[block].busy.info.size;