support copy on write in libgmm