let unalloc space id =
idfree := snd id :: !idfree ;
try
let k = Ihmap.find space.indices id in
let a = Hashtbl.find space.alloc (fst id) in
match k with
| Base -> a.based <- false
| Idx k -> a.free <- k :: a.free
| Link k -> space.reserved <- Kset.remove k space.reserved
with Not_found -> ()