[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] bugs report
From: |
bump |
Subject: |
Re: [gnugo-devel] bugs report |
Date: |
Fri, 11 Jul 2003 10:15:40 -0700 |
Pcibus wrote:
> 1.memory leak report:
>
> 1.1 engine\owl.c 5354 line. leak 1,002,848 bytes.
> owl_stack = malloc(owl_stack_size * sizeof(*owl_stack));
>
> 1.2 engine\cache.c 226 line. leak 3,632,172 bytes.
> table->all_results = (Read_result *)
> malloc(num_results * sizeof(Read_result));
>
> 1.3 engine\cache.c 217 line. leak 3,459,216 bytes.
> table->all_nodes = (Hashnode *) malloc(num_nodes * sizeof(Hashnode));
>
> 1.4 engine\cache.c 210 line. leak 1,297,204 bytes.
> table->hashtable = (Hashnode **) malloc(tablesize * sizeof(Hashnode *));
The owl stack and hash tables are allocated once per GNU Go process
and never freed. According to the libc documentation:
> There is no point in freeing blocks at the end of a program, because
> all of the program's space is given back to the system when the process
> terminates.
Is this comment is specific to GCC or is it true for all
compilers? (Pcibus is running VC++). If I understand correctly
there is no need to call cfree for the owl stack and hash tables.
Dan
Re: [gnugo-devel] bugs report, bump, 2003/07/11