Dr. Thomas Fischbacher wrote:
The OCaml manual gives no guarantee that Hashtbl.hash does not cons, so
I cannot assume this.

Indeed, Hashtbl.hash can cons, but this does not contradict my point: its result does not depend on the physical location of objects in memory
(if it did, it would be impossible to use this function at all).

Now, without that guarantee, there is a nasty race
condition in which the determination of the hash bucket causes objects
to move in memory.

Yes, objects can move in memory, but what is wrong with that? Their new hash value will remain the same.

-- Alain

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to