Re: Performer out of memory behavior

New Message Reply Date view Thread view Subject view Author view

From: Yair Kurzion (yair++at++polygon.engr.sgi.com)
Date: 02/07/2001 14:59:19


Mark,

> Great! This looks like what I need. One question though. Do you know
> whether PFNFY_RESOURCE is used for anything else besides out of memory
> conditions?

Yes. It's used for all resource-related pfNotifies: Memory, Texture, Window,
clock, light-sources, pipes, etc.

You can always compare the error string (yuck), but why ? The Notify handler
doesn't provide a way to fix the out-of-memory condition. It only lets you
shutdown your processes gracefully. Am I missing something ?

-yair

>
> Mark Acosta
> Magic Earth, Inc.
>
> -----Original Message-----
> From: yair++at++polygon.engr.sgi.com [mailto:yair++at++polygon.engr.sgi.com]
> Sent: Wednesday, February 07, 2001 3:35 PM
> To: macosta++at++magic-earth.com
> Cc: info-performer++at++sgi.com
> Subject: Re: Performer out of memory behavior
>
>
> Hello Mark !
>
> > Performer has the annoying behavior of exiting when it can't honor a
> > memory request out of shared memory. Is there any way to change this
> > behavior like having it return NULL or calling a callback notifying the
> > application that it failed? At the very least I'd like something that
> would
> > let me take some action before Performer kills the program. Thanks.
>
> When running out of memory, Performer calls
>
> pfNotify(PFNFY_FATAL, PFNFY_RESOURCE, ...
>
> The default pfNotify handler exits on PFNFY_FATAL. You can replace it with
> a more mellow handler (man pfNotifyHandler). You can then take the required
> action before calling exit or return normally and expect NULL as the
> pfMalloc
> result.
>
> -yair
>
> --
> \_________ \_____ \__ \__ \_____ Yair Kurzion
> \_________ \_____ \__ \__ \_____ yair++at++sgi.com
> \__ \__ \____\__ \__ http://reality.sgi.com/yair
> \__ \__ \__ Work: (650) 933-6502
> \__ \__ \__ Home: (408) 226-9771
> \__ \__ \__
>

-- 
\_________  \_____  \__    \__  \_____         Yair Kurzion
\_________  \_____   \__   \__  \_____         yair++at++sgi.com
       \__     \__   \____\__      \__   http://reality.sgi.com/yair
       \__          \__  \__                Work: (650) 933-6502
       \__          \__   \__               Home: (408) 226-9771
       \__          \__    \__             


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Feb 07 2001 - 14:59:22 PST

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