/* free amap */ /* * amap_free: free an amap * * => the amap must be unlocked * => the amap should have a zero reference count and be empty */