Initializes a scoped pool with max_mem
Use only if ScopedPool is the highest on stack.
See Implementation