[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspell-devel] Aspell core dump
From: |
Kevin Atkinson |
Subject: |
Re: [aspell-devel] Aspell core dump |
Date: |
Thu, 16 Dec 2004 12:09:39 -0700 (MST) |
On Thu, 16 Dec 2004, Gary Setter wrote:
> I would say that the code is difficult to understand. It does not
> seem to me to be "solid code". To make a change, like adding a
> field to whatever WritableBase::word_lookup holds would involve
> exhaustive study of the whole module. Even after much study, you
> would never be completely sure if your change broke someone
> else's assumption. To just document it as it is would be
> something of a cop out.
The void pointer array in WordEntry is simply a generic place to stick
some data. It is a rather common practice so I don't see how that is
hard to understand. The alternative would be to make WordEntry a virtual
base class. This will involve unnecessary allocation of dynamic memory and
functions calls. The way I decided WordEntry was that no extra dynamic
memory needs to be allocated, and in the common case of only one word no
functions calls are needed. I am unlikely to change it.
The "(StrVector *)(s - sizeof(StrVector) - 2)" is there because it
simplified storing the data in the hash table. I am open to patches that
avoid it with out adding significant performance penalty or adding a lot
of extra code. Of course I expect the changes to self contained within
the file writable.cpp.
Don't even think about changing readonly_ws.cpp the data there is very
carefully laid out to avoid wasting a lot of space with extra pointers.
--
http://kevin.atkinson.dhs.org
- [aspell-devel] Aspell core dump, James Lee, 2004/12/09
- Re: [aspell-devel] Aspell core dump, Kevin Atkinson, 2004/12/09
- Re: [aspell-devel] Aspell core dump, Gary Setter, 2004/12/13
- Re: [aspell-devel] Aspell core dump, Gary Setter, 2004/12/15
- Re: [aspell-devel] Aspell core dump, Kevin Atkinson, 2004/12/15
- Re: [aspell-devel] Aspell core dump, Kevin Atkinson, 2004/12/16
- Re: [aspell-devel] Aspell core dump, Gary Setter, 2004/12/16
- Re: [aspell-devel] Aspell core dump,
Kevin Atkinson <=
- Re: [aspell-devel] Aspell core dump, Jose Da Silva, 2004/12/17
- Re: [aspell-devel] Aspell core dump, Kevin Atkinson, 2004/12/17
- Re: [aspell-devel] Aspell core dump, Gary Setter, 2004/12/17
- Re: [aspell-devel] Aspell core dump, Kevin Atkinson, 2004/12/17
- Re: [aspell-devel] Aspell core dump, Jose Da Silva, 2004/12/17
- Re: [aspell-devel] Aspell core dump, Gary Setter, 2004/12/17
- Re: [aspell-devel] Aspell core dump, Jose Da Silva, 2004/12/17
- Re: [aspell-devel] Aspell core dump, James Lee, 2004/12/20
- Re: [aspell-devel] Aspell core dump, Gary Setter, 2004/12/20
- Re: [aspell-devel] Aspell core dump, Kevin Atkinson, 2004/12/21