am_ncused
else if (endbucket + 1 - startbucket >= amap->am_ncused) {
amap->am_ncused++;
amap->am_ncused--;
amap->am_ncused = 0;