set p to allocated storage
p = avail();