From: Mark Acosta (macosta++at++magic-earth.com)
Date: 02/07/2001 15:26:34
Yair,
You said that I could just return normally from the handler and the
result would be a NULL pointer returned from pfMalloc. This is actually what
I'd like to do. I would like to give my application the chance to recover
rather than just exit. For all other resource errors, I'd just let Performer
process them normally. It possible to do this?
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 4:59 PM
To: macosta++at++magic-earth.com
Cc: macosta++at++magic-earth.com; info-performer++at++sgi.com
Subject: Re: Performer out of memory behavior
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
\__ \__ \__
This archive was generated by hypermail 2b29 : Wed Feb 07 2001 - 15:26:05 PST