From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA08028; Wed, 25 Jul 2001 20:20:10 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA08024 for ; Wed, 25 Jul 2001 20:20:09 +0200 (MET DST) Received: from hopper.math.uwaterloo.ca (hopper.math.uwaterloo.ca [129.97.78.132]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f6PIK7D09145 for ; Wed, 25 Jul 2001 20:20:07 +0200 (MET DST) Received: (from adubey@localhost) by hopper.math.uwaterloo.ca (8.8.8/8.8.8) id OAA06487 for caml-list@inria.fr; Wed, 25 Jul 2001 14:20:05 -0400 (EDT) From: Amit Dubey Message-Id: <200107251820.OAA06487@hopper.math.uwaterloo.ca> Subject: [Caml-list] Strange Behaviour with Hashtables and Marshalling To: caml-list@inria.fr Date: Wed, 25 Jul 2001 14:20:05 -0400 (EDT) X-Mailer: ELM [version 2.5 PL3] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi Everyone, I've recetly have two odd things happen to me in O'Caml, and I was wondering if anyone else has come across the same behaviour -- (1) If I'm doing some processing, then I save a few relevant data structures to disk with Marshal, terminate, then restart, reload the data and then continue processing, I use significantly less memory than if I process everything without stopping. I'd imagine with garbage collection, this wouldn't be a problem, yet I have come across it with both the x86 and sparc native code versions (haven't tried bytecodes or any other platform). Forcing a GC collection doesn't seem to help. (2) If I'm saving really really big hashtables, which are part of an enumerated type that can also contain closures ie: module MyHash = Hashtbl.Make(...) type t = Table of float MyHash.t | Junk of foo | Func of (float -> float) After marshalling and reloading an instance of Table(s), some elements in the table have mysteriously changed. This isn't a problem if I change the type of t to: type t = Table of float MyHash.t | Junk of foo Again, I think I noticed this on both the sparc and x86 versions. I didn't find out exactly what was going on (deadlines!), but I was just wondering if anyone might have ideas as to what the problem might be. Thanks, Amit Dubey ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr