[Top][All Lists]

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

[aspell] Re: Best way to Share Read only Data between processes.

From: Kevin Atkinson
Subject: [aspell] Re: Best way to Share Read only Data between processes.
Date: Fri, 21 Jan 2000 18:14:09 -0500

David Everett wrote:
> On 01/17/00, "Kevin Atkinson <address@hidden>" wrote:
> >OK, thanks.  Mmaping the date file directly in will also allow for
> >faster loading and possibly less memory usage so I think that is what I
> >am going to do.
> >
> That's a good idea, and for the right reasons, but be careful how you do
> it.  Memory mapping tends to be very machine specific for such things as
> page sizes and address management.  Different version of Unix aren't always
> compatable with each other and it only gets worse when someone tries to
> port the code over to Linus, Beos, or even Windoze.
> I'm not saying that you shouldn't do it (in fact quite the opposite) but
> rather I'm asking that you consider puting the dictionary memory allocation
> and loading code in a totally isolated routine with a well defined
> interface so that it can be entirely replaced if necessary without
> affecting the other code.

Don't worry my code for the the readonly word list is very independent
from the rest of aspell.  Infact you can very easily replace it with
another totally different implantation without affecting the rest of the
program.  Heck, my library interface even allows you to have multiple
read only word lists, like say a main one and then a special one of
technical terms, plus, you can still have you personal and session word
lists, or even multiple personal words lists if you like.

Also if the mmap fails I will simply allocated some memory myself and
read the data in directly.

The ongoing problam I have with my present format is that it has not
been tested yet on an alpha platform and I don't know if all my code is
100% 64 bit clean.  So far the only two platforms I have been able to
test are i386-linux and sparc-solaris.  I know that it at the momonet
basically requires a modern version of gcc or egcs but I don't know
about 64-bit platforms with gcc or egcs.

Kevin Atkinson

reply via email to

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