Memory space in db loaders

New Message Reply Date view Thread view Subject view Author view

Jay Gischer (gischer++at++puget.engr.sgi.com)
Mon, 4 May 1998 14:34:51 -0700 (PDT)


Javier Abadia Miranda writes:
> Hello:
>
> How is memory space managed in database loaders?
>
> I have written a loader that is dinamically linked
> and called with pfdLoadFile() mecanism.
>
> During the app, several files are loaded by subsequent
> calls to this pfdLoadFile().
>
> My question is:
>
> If I use static variables inside de loader's code, how many
> copies of that variables exist ?
>
One of each.

> Do they get initialized each time the loader is called?
>
No. Well, they do if you wrote the code to initialize them each time
you open a new file, but then you wouldn't be asking the question,
would you?

> Otherwise, do they mantain the values from one call to
> the next?
>
Yes.
Well, there's one thing I don't know for sure, and that is if
Performer ever unlinks a dynamically linked loader. I don't think it
does, but I haven't verified it, and if it does, then the answer is
"No, sometimes they don't."

> Which is the *politically correct* way of keeping
> configuration modes, values and attributes from call
> to call?
>
> pfdSetConverterMode(someting);
> pfdLoadFile(one file); /* with mode something */
> pfdLoadFile(other file); /* with mode something also */
>
Dunno about politics, but using a static variable (or a static member
variable) should work just fine.

=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:21 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.