Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr, dmitry grebeniuk <gds-mlsts@moldavcable.com>
Subject: Re: [Caml-list] announce: objsize-0.1
Date: Thu, 13 Dec 2007 13:11:56 +0000	[thread overview]
Message-ID: <200712131311.57104.jon@ffconsultancy.com> (raw)
In-Reply-To: <921352207.20071213105242@moldavcable.com>

On Thursday 13 December 2007 08:52, dmitry grebeniuk wrote:
> Hello, caml-list.
>
>   Some time ago there was a discussion about measuring
> sizes of ocaml values.  I've got some "round tuits" and
> released a library that I use in my programs for some
> years.  Maybe it will be useful for other people too.
>   It is better than pure ocaml solutions because it
> doesn't build hash table of visited values, and it uses
> two bits for each visited value in worst case (but in my
> practice it used no more than 120kb of additional memory
> when I measured sizes of 300Mb-values).
>
> Readme:  http://89.187.37.10/gds/objsize/README
> Tarball: http://89.187.37.10/gds/objsize/objsize-0.1.tar.gz

This doesn't seem to work on 64-bit. First I get:

configure.c:24: warning: format ‘%i’ expects type ‘int’, but argument 2 has 
type ‘long unsigned int’
...

Replacing %i with %ld in configure.c, this compiles but then I get:

$ make
gcc -ansi -W -Wall -Werror -Wno-long-long -pedantic \
            -c configure.c -o configure.o
gcc configure.o -o configure.exe  && \
        rm -f configure.o
./configure.exe > ocamlsrc/config/m.h  && \
        rm -f configure.exe
ocamlc -c  -I ./ocamlsrc/byterun c_objsize.c
In file included from bitarray.c:1,
                 from c_objsize.c:11:
./ocamlsrc/byterun/config.h:51:2: error: #error "No integer type available to 
represent pointers"
In file included from bitarray.c:19,
                 from c_objsize.c:11:
alloc.c: In function ‘bitarrayalloc_realloc’:
alloc.c:29: warning: format ‘%u’ expects type ‘unsigned int’, but argument 4 
has type ‘size_t’
alloc.c:29: warning: format ‘%u’ expects type ‘unsigned int’, but argument 5 
has type ‘long unsigned int’
alloc.c:29: warning: format ‘%u’ expects type ‘unsigned int’, but argument 6 
has type ‘size_t’
In file included from c_objsize.c:13:
ocamlsrc/byterun/misc.h: At top level:
ocamlsrc/byterun/misc.h:96: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ 
or ‘__attribute__’ before ‘caml_verb_gc’
ocamlsrc/byterun/misc.h:97: error: expected declaration specifiers or ‘...’ 
before ‘uintnat’
In file included from c_objsize.c:17:
...

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?e


  reply	other threads:[~2007-12-13 19:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-13  8:52 dmitry grebeniuk
2007-12-13 13:11 ` Jon Harrop [this message]
2007-12-14 12:05   ` announce: objsize-0.11 dmitry grebeniuk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200712131311.57104.jon@ffconsultancy.com \
    --to=jon@ffconsultancy.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=gds-mlsts@moldavcable.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox