improve raw_byte_allocate