Add alloc check to hidx. Simplify bucket interface.