generic memory pool code and other compositor wip