RE: Performer out of memory behavior

New Message Reply Date view Thread view Subject view Author view

From: Mark Acosta (macosta++at++magic-earth.com)
Date: 02/07/2001 14:48:08


Yair,

        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?

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
       \__          \__    \__             


New Message Reply Date view Thread view Subject view Author view

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

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