Simpler implementation of Allocate handler.