Stewart Smith wrote:
> On Thu, Jan 28, 2010 at 10:37:32PM -0800, Monty Taylor wrote:
>> Also - if there's a way to make it so that the client progs don't have
>> to link that chunk of code from the server, that would be swell... but
>> then also something I'll get over.
> 
> obviously error info should be sep and not be too bad.
> 
> how does gperf do it?

gperf makes this:

inline unsigned int
symbol_hash::hash (register const char *str, register unsigned int len)
{
  static const unsigned short asso_values[] =
    {
      1522, 1522, 1522, 1522, 1522, 1522, 1522, 1522, 1522, 1522,

So it's a static variable that's made in a function (classic singleton
pattern)

> thinking that if it's just static in the binary then the memory pages
> are shared between all processes that have the lib loaded, if we
> generate it on startup, more r/w pages.

Right... but the thing is that there is no lib here. At least not right
now. Currently we're just statically linking in the object files by way
of libtool convenience libs.

In general, I don't think we need to get too fancy here - it's not that
much data and it only (as stewart points out) gets processed once at
started. Only things I care about are a) sane source code b) no valgrind
warnings.

Monty

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to