buffer allocate