caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* announce: objsize-0.1
@ 2007-12-13  8:52 dmitry grebeniuk
  2007-12-13 13:11 ` [Caml-list] " Jon Harrop
  0 siblings, 1 reply; 3+ messages in thread
From: dmitry grebeniuk @ 2007-12-13  8:52 UTC (permalink / raw)
  To: caml-list

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

-- 
WBR,
 dmitry                          mailto:gds-mlsts@moldavcable.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] announce: objsize-0.1
  2007-12-13  8:52 announce: objsize-0.1 dmitry grebeniuk
@ 2007-12-13 13:11 ` Jon Harrop
  2007-12-14 12:05   ` announce: objsize-0.11 dmitry grebeniuk
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Harrop @ 2007-12-13 13:11 UTC (permalink / raw)
  To: caml-list, dmitry grebeniuk

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* announce: objsize-0.11
  2007-12-13 13:11 ` [Caml-list] " Jon Harrop
@ 2007-12-14 12:05   ` dmitry grebeniuk
  0 siblings, 0 replies; 3+ messages in thread
From: dmitry grebeniuk @ 2007-12-14 12:05 UTC (permalink / raw)
  To: caml-list

Hello, Jon.

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

  Thanks for testing, now it works on your platform too.

Readme:  http://89.187.37.10/gds/objsize/README
Tarball: http://89.187.37.10/gds/objsize/objsize-0.11.tar.gz

-- 
WBR,
 dmitry                          mailto:gds-mlsts@moldavcable.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-12-14 12:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-13  8:52 announce: objsize-0.1 dmitry grebeniuk
2007-12-13 13:11 ` [Caml-list] " Jon Harrop
2007-12-14 12:05   ` announce: objsize-0.11 dmitry grebeniuk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).