Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Garbage collector and memory fragmentation
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-05-24 (10:23)
From: Markus Mottl <markus@o...>
Subject: Re: [Caml-list] Garbage collector and memory fragmentation
On Fri, 24 May 2002, francois bereux wrote:
> My question is : does a garbage collector (for instance the one in
> OCaml) deal with this kind of issues ( defragmentation of the memory )
> in a situation similar to mine : many small lists of elements ?

The GC employed by OCaml is able to compact the heap, which means
it essentially defragments memory. You can parameterize it with the
frequency of such compactions (they are very expensive), turn them off
completely or force them manually. Take a look at the interface of the
Gc-module in the distribution for more details.

Markus Mottl

Markus Mottl                                   
Austrian Research Institute
for Artificial Intelligence        
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: