[Top][All Lists]

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

Re: [gnugo-devel] Crash report for OS X Segmentation fault

From: Gunnar Farneback
Subject: Re: [gnugo-devel] Crash report for OS X Segmentation fault
Date: Fri, 11 Jan 2002 19:37:51 +0100
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode)

Arend wrote:
> Compared to Gunnar's solution, this patch may need a little more memory
> but should be slightly faster. I have no strong feelings about which one
> might be preferrable.

This function should not be time-critical, so saving some more memory
is probably better. Furthermore...

> -  int result[MAX_BOARD * MAX_BOARD];
> -  static int moyo_is_adjacent[MAX_BOARD * MAX_BOARD][MAX_MOYOS + 1];
> +  int result[number_of_dragons];
> [...]
> +    int moyo_is_adjacent[number_of_dragons][moyos.number + 1];

...these declarations are not portable. Non-constant array sizes can
be used in gcc and possibly some more compiler but are not included in
standard C.


reply via email to

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