From: Tom Jolley (jolley++at++fltsim.stl.mo.boeing.com)
Date: 01/04/2000 06:41:23
Hi Allan,
I did some more tests and found that I can only get this problem
to appear when compiling with -32. Below is an example program
that will demonstrate the problem.
Allan Schaffer wrote:
>
> On Jan 3, 4:29pm, Tom Jolley wrote:
> > I am having trouble with Performer changing the shared arena
> > base address that I am requesting. It seems that Performer
> > will first try a new base address if it can't get enough memory
> > rather than reducing the amount of memory requested. This is
> > OK when I don't request a base address but causes problems when
> > I need a specific base address.
>
> Hmm, I don't see a way for this to happen. The address requested via
> pfSharedArenaBase() [or set via $PFSHAREDBASE] is the only one passed
> to mmap() even if multiple attempts occur. Did something indicate
> that the base address was changing?
>
> Allan
>
> --
> Allan Schaffer allan++at++sgi.com
> Silicon Graphics http://reality.sgi.com/allan
#include <stdio.h>
/* ..Performer include files. */
#include <Performer/pf.h>
#include <Performer/pr.h>
int main( int argc, char *argv[] )
{
size_t shared_size = 0x60000000;
void *shared_base = (void*)0x1c000000;
/* ..Set the base address and size of Performer shared memory. */
printf( "Setting shared size to 0x%08x\n", shared_size );
pfSharedArenaSize( shared_size );
printf( "Setting shared memory base address to 0x%p\n",
shared_base );
pfSharedArenaBase( shared_base );
/* ..Print out results of arena size and address. */
printf( "Before pfInit - arena address 0x%p\n",
pfGetSharedArenaBase() );
/* ..Initialize IRIS Performer: create shared memory */
pfInit();
/* ..Print out results of arena size and address. */
printf( "After pfInit - arena address 0x%p, arena size = 0x%08x\n",
pfGetSharedArena(), pfGetSharedArenaSize() );
pfExit();
return 0;
}
-- Tom Jolley jolley++at++fltsim.stl.mo.boeing.com
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 06:41:42 PST