Support multiple backends and add alloc backend

why "m"?