[K42-discussion] static_buf in gentmp
Donour Sizemore
donour at cs.unm.edu
Thu Jan 4 08:43:06 EST 2007
Dilma DaSilva wrote:
> Donour Sizemore writes:
> > I'm getting linking errors like this:
> >
> [examples removed]
>
> > That seem to be coming from the code created from gentmp.awk.
> >
> > -- gentmp.awk --
> > function createStandardFunc()
> > {
> > ...
> >
> > printf("template<> char
> > %s<INSTNAME>::static_buf[sizeof(%s<INSTNAME>)]\n",TMclass,TMclass)
> > > XF;
> >
> > ...
> > --
> >
> >
> > Does anybody know what the purpose of the static_buf member?
> >
>
> Donour,
>
> I was not familiar with this "static_buf", but poking around I see that
> the generated code for TypeMgrServer (for example in file
> powerpc/fullDeb/lib/libc/cobj/tmplTplXTypeMgrServer.I) invokes
> TplMetaTypeMgrServer<INSTNAME> *self = new(static_buf) TplMetaTypeMgrServer<INSTNAME>;
>
> and then
> DREFGOBJ(TheTypeMgrRef)->registerTypeHdlr(typeID(), xoh,(uval)self);
>
> This means that method TypeMgr::registerTypeHdlr (in lib/libc/cobj/TypeMgr.C) stores
> the allocated static_buf as "localPtr", which can be retrieved by
> method TypeMgr::getTypeLocalPtr (invoked from giveAccessSetClientData
> or giveAccessInternal).
>
> What do you have on your generated TplMetaTypeMgrServer.H?
>
I'm sorry. I don't understand the question.
donour
More information about the K42-discussion
mailing list