chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Segfault with large data-structures


From: Jim Ursetto
Subject: Re: [Chicken-users] Segfault with large data-structures
Date: Sat, 2 Feb 2013 14:40:54 -0600

What version of chicken, and if 4.8.0 for example could you try 4.7?

On Feb 2, 2013, at 11:51, Arthur Maciel <address@hidden> wrote:

> Hello! I don't know if it is related to Ivan's problem, but when I compile 
> and run this code:
> 
> (use srfi-69)
> 
> (define NODES 250000)
> (define EDGES 1000)
> 
> (define graph (make-hash-table))
> 
> (define (insert-edges)
>   (printf "~N Hash-tables - Inserting edges ~N")
>   (do ((n 1 (+ n 1))) ((= n NODES))
>     (if (= (remainder n 5000) 0)
>         (printf " ~S nodes inserted ~N" n))
>     (do ((e 2 (+ e 1))) ((= e (+ 1 EDGES)))
>       (hash-table-update!/default graph
>                                   n
>                                   (lambda (edges-list)
>                                     (if (member e edges-list)
>                                         edges-list
>                                         (cons e edges-list)))
>                                   (list e)))))
> 
> (time  (insert-edges))
> 
> I get this:
> 
>  $ csc list-in-hash-table-partials.scm -o list-partials.scm
>  $ ./list-partials.scm 
> 
>  Hash-tables - Inserting edges 
>  5000 nodes inserted 
>  10000 nodes inserted 
>  15000 nodes inserted 
>  20000 nodes inserted 
>  25000 nodes inserted 
>  30000 nodes inserted 
>  35000 nodes inserted 
>  40000 nodes inserted 
> Segmentation fault
> 
> 
> I tried to compile with -O2, -O -d2 and -O3. It doesn't make difference for 
> me: it always present a segfault. Any hint on how to make it work?
> 
> Thanks!
> Arthur
> _______________________________________________
> Chicken-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/chicken-users



reply via email to

[Prev in Thread] Current Thread [Next in Thread]