add code example to pooled allocation