Re: Strange hugeness of .o, .cmo, and .cmi files

From: Xavier Leroy (
Date: Wed Mar 31 1999 - 17:59:12 MET DST

Date: Wed, 31 Mar 1999 17:59:12 +0200
From: Xavier Leroy <>
To: John Prevost <>,
Subject: Re: Strange hugeness of .o, .cmo, and .cmi files
In-Reply-To: <>; from John Prevost on Wed, Mar 31, 1999 at 01:19:50AM -0500

> [Surprisingly large .cmo / .o files]

It's hard to say what's happening without seeing the source or the
generated assembly code. If that kind of things doesn't scare you,
just compile with ocamlopt -S and look at the resulting .s file.
However, I'll venture a guess:

> Obviously, there are a lot of fields in the record type, and I
> assume that this is where the blowup is happening, but I'm not at
> all sure where.

OCaml 2.01 had a known code size problem with the
{ record with lbl = newval } construct, when "record" belongs to a
type with many labels. This was fixed in OCaml 2.02, however.


- Xavier Leroy

This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:21 MET