[Caml-list] More re GC hanging

2010-08-14 Thread Paul Steckler
I haven't yet come up with a solution to the GC hanging problem I mentioned the other day. But here's something that looks funny. I changed the default minor heap size, the major heap increment, the allocation policy. I also threw in a `Gc.major_slice 0' in the code. After turning on the Gc verb

Re: [Caml-list] More re GC hanging

2010-08-15 Thread Basile Starynkevitch
On Sun, 2010-08-15 at 15:57 +1000, Paul Steckler wrote: > I haven't yet come up with a solution to the GC hanging problem I > mentioned the other day. > > But here's something that looks funny. [..] > After turning on the Gc verbose option, I see: [...] > !<>Sweeping 9223372036854775807 words >

Re: [Caml-list] More re GC hanging

2010-08-15 Thread Paul Steckler
On Sun, Aug 15, 2010 at 5:03 PM, Basile Starynkevitch wrote: > I guess this is related to the fact that recent Linux kernel have turned > on the randomize virtual address space feature -designed to improve > system security. You could disable it by >  echo 0 > /proc/sys/kernel/randomize_va_space >

Re: [Caml-list] More re GC hanging

2010-08-15 Thread Paul Steckler
> I guess this is related to the fact that recent Linux kernel have turned > on the randomize virtual address space feature -designed to improve > system security. You could disable it by >  echo 0 > /proc/sys/kernel/randomize_va_space > but first learn more about it. For some reason, I was able t

Re: [Caml-list] More re GC hanging

2010-08-15 Thread Basile Starynkevitch
On Sun, 2010-08-15 at 18:40 +1000, Paul Steckler wrote: > > I guess this is related to the fact that recent Linux kernel have turned > > on the randomize virtual address space feature -designed to improve > > system security. You could disable it by > > echo 0 > /proc/sys/kernel/randomize_va_space

Fwd: [Caml-list] More re GC hanging

2010-08-15 Thread Paul Steckler
On Sun, Aug 15, 2010 at 7:16 PM, Basile Starynkevitch wrote: > To check that it did work as expected (which I doubt) do >   cat /proc/sys/kernel/randomize_va_space > it should give 0 It did work as expected. > Are you sure that you don't have badly coded C routines that you call > from your Ocam

Re: [Caml-list] More re GC hanging

2010-08-15 Thread rixed
> For some reason, I was able to edit that file using emacs, even when > echo wouldn't work. maybe you wrote "sudo echo 0 > file" or something similar which perfoms the echo as root but the redirection as normal user ?___ Caml-list mailing list. Subscri

Re: [Caml-list] More re GC hanging

2010-08-15 Thread Adrien
Hi, I recently had similar output from the GC (huge count of words) which I noticed after my program started to exit with an out-of-memory error. It doesn't seem to be happening anymore but I'm not sure I "fixed" it. There are three things I thought of to get rid of it. (btw, I'm on 64bit linux)

RE: [Caml-list] More re GC hanging

2010-08-15 Thread David Allsopp
Adrien wrote: > Hi, > Also, on my computer, I have the following behaviour: > 11:44 ~ % sudo echo 0 > /proc/sys/kernel/randomize_va_space > zsh: permission denied: /proc/sys/kernel/randomize_va_space > r...@jarjar:~# echo 0 > /proc/sys/kernel/randomize_va_space > r...@jarjar:~# >

Re: [Caml-list] More re GC hanging

2010-08-15 Thread Basile Starynkevitch
On Sun, 2010-08-15 at 12:45 +0200, Adrien wrote: > > Finally, C bindings. I created a few while not having access to the > internet and they are quite dirty. I highly doubt they play perfectly > well with the garbage collector: they seem ok but probably aren't > perfect. That's definitely somethi

Re: [Caml-list] More re GC hanging

2010-08-18 Thread Goswin von Brederlow
Paul Steckler writes: > I haven't yet come up with a solution to the GC hanging problem I > mentioned the other day. > > But here's something that looks funny. I changed the default minor > heap size, the major > heap increment, the allocation policy. I also threw in a > `Gc.major_slice 0' in t

Re: [Caml-list] More re GC hanging

2010-08-20 Thread Richard Jones
On Sun, Aug 15, 2010 at 09:03:41AM +0200, Basile Starynkevitch wrote: > On Sun, 2010-08-15 at 15:57 +1000, Paul Steckler wrote: > > I haven't yet come up with a solution to the GC hanging problem I > > mentioned the other day. > > > > But here's something that looks funny. [..] > > > After turni

Re: [Caml-list] More re GC hanging

2010-08-20 Thread Eray Ozkural
On Fri, Aug 20, 2010 at 6:21 PM, Richard Jones wrote: > > On Sun, Aug 15, 2010 at 09:03:41AM +0200, Basile Starynkevitch wrote: > > On Sun, 2010-08-15 at 15:57 +1000, Paul Steckler wrote: > > > I haven't yet come up with a solution to the GC hanging problem I > > > mentioned the other day. > > >

Re: [Caml-list] More re GC hanging

2010-08-22 Thread Adrien
David and Basile, you are absolutely right about the redirection issue. It also pretty obvious actually. I guess I need to pay more attention. Back to the original problem, I thought I had somehow gotten rid of it but it still happens on someone else's computer. Calling 'Gc.compact' regularly seem

Re: [Caml-list] More re GC hanging

2010-08-25 Thread Goswin von Brederlow
Adrien writes: > Also, I found out that I had a pretty ugly error in my C bindings but > it looks like it had no bad impact. > Basically, I had 'external ml_f : *string* -> string array' but the C > side read 'value ml_f()': the C function took *no* argument while > ocaml was passing one (I wasn'

Re: [Caml-list] More re GC hanging

2010-09-01 Thread Damien Doligez
On 2010-08-15, at 12:45, Adrien wrote: > First, remove all non-tail-rec functions: no more List.map, @ or > List.concat. All lists were pretty short (definitely less than 1000 > elements) but maybe the amount of calls generated garbage or something > like that: I couldn't get much infos about the

Re: [Caml-list] More re GC hanging

2010-09-01 Thread Adrien
On 01/09/2010, Damien Doligez wrote: > > On 2010-08-15, at 12:45, Adrien wrote: > >> First, remove all non-tail-rec functions: no more List.map, @ or >> List.concat. All lists were pretty short (definitely less than 1000 >> elements) but maybe the amount of calls generated garbage or something >>