Improved way we allocate gpu memory