Re: shared arenas

New Message Reply Date view Thread view Subject view Author view

Anita Kishore (kishore++at++triavest.com)
Thu, 4 Sep 1997 09:50:26 -0700


On Sep 3, 10:42am, Tom Impelluso wrote:
> Subject: shared arenas
> Hi,
>
> I have notice that whatever commands which require the
> memory from shared memory; i.e.:
>
> pfMalloc(sizeof(DCSData), arena);
>
> they must always be prefaced by:
>
> arena = pfGetSharedArena();
>
>
> In fact, as I understand, it is even possible to do this:
>
> pfMalloc(sizeof(DCSData), pfGetSharedArena());
>
>
> This, now, begs the question:
>
> What is the purpose of pfGetSharedArena();
>
>
> Meaning this:
>
> If it must always be called, what is the point of
> having it as an optional command? Why not imbed it inside the
> pfMalloc()? The fact that this is not done suggests, to me, that
> there must be another purpose for:
>
> arena = pfGetSharedArena();
>
> which has a use distinct from
>
> pfMalloc(sizeof(DCSData),arena);
>
>
> Could someone elaborate on this?
>
> Thanks,
> Tom

You have a choice of entering either NULL or the arena pointer in pfMalloc
call. By entering NULL you are indicating that your malloc should happen
on the heap, whereas giving an arena pointer means that malloc should happen
on a shared arena. You could always make a one time call to pfGetSharedArena()
and save the pointer returned by it for subsequent use.

Hope this helps

-anita
kishore++at++triavest.com

-- 
Anita Kishore
=======================================================================
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:55:52 PDT

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