Version franaise
Home About Download Resources Contact us
Browse thread
OCaml memory leak issue
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Török Edwin <edwintorok@g...>
Subject: Re: [Caml-list] OCaml memory leak issue
On Tue, 23 Nov 2010 19:54:24 -0800
"Kecheng" <kecheng@cecs.pdx.edu> wrote:

> Hi,
> 
> I used valgrind to check the memory usage of my OCaml byte code, but
> I found that a memory leak. I'm very confused what the problem is. I
> tried a very simple code as following, and compileed it. 
> 
> +++++++++++++++++++++++
> let test  = 
>     let a = 1 in
>     let b = a + 5 in
>     printf "%d\n" b;
> ;;
> test;;
> +++++++++++++++++++++++

I think you need to call the GC on exit explicitly, its not done by
default.

Best regards,
--Edwin