Re: pfInitVClock question

New Message Reply Date view Thread view Subject view Author view

Martin Roth (roth++at++anubis)
Sat, 18 Feb 1995 21:28:53 +0100


Hi out there,

I'm wondering how to prevent Performer from exiting when memory gets exhausted.
I don't want to have more shared memory allocated because that doesn't solve
my problem.

In my application I have a dynamic scene. When flying over the landscape of
Switzerland I am dynamically loading new parts of Switzerland and adding them
to the scene while other parts that have passed by are inserted into a cache.
They are not freed because the user could turn around and loading would be
far more time-consuming than retreiving from the cache.

Every allocation is done by a function which will free contents of the cache
using a LRU strategy when memory gets exhausted. This sort of allocation is
done by overloading the new operator of my classes. With this strategy I cannot
run out of memory.

There's just one problem: Many Performer data structures are allocated through
a pfNew... function and I cannot get control over it. I've written a function
similar to the overloaded new operator described above which can be passed a
pfNew... function which will also free cache contents if the pfNew... function
should return NULL. But these functions do not return NULL but generate the
following fatal error and exit:

Performer Fatal: pfMalloc() Unable to allocate 31104 bytes from arena 0x580000.
If using the libpf shared memory arena,
try using a filesystem bigger than (98036.00Kbytes).
Use the PFTMPDIR environment variable or pfTmpDir

I am using the libpf shared memory arena but, as mentioned above, using a
bigger
file system would only postpone the problem.

Is there a possibility to handle that case in an other way than just to exit?
Can I set up a handler preventing the application from exiting when an error
of a notification level of PFNFY_FATAL appears?

Thanks for every hint

Martin

_______________________________________________________________________________
 /| /|) S. H. Martin Roth
/ |/ |\OTH Student in Computer Science

ETHZ, Swiss Federal Institute of Technology Zuerich email: sroth++at++iiic.ethz.ch
UniZh, University of Zuerich email: roth++at++ifi.unizh.ch


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:50:58 PDT

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