avoid calling brealloc() when unnecessary