Newsgroups: comp.parallel
From: Tom Nurkkala <nurkkala@cs.umn.edu>
Subject: Shared memory and static variables
Organization: University of Minnesota
Date: 5 Oct 1995 14:22:04 GMT
Message-ID: <450pmc$rbg@usenet.srv.cis.pitt.edu>

Is anyone aware of an SGI compiler mechanism to declare
static variables to be allocated in a non-shared memory
partition when running in a shared-memory multiprocessor
environment?  For example, when running multiple tasks
using m_fork, the entire virtual address space appears
to be shared, including static variables.  If such a
static is being used as a function return value (say
a variable of type 'static char[N]', then each process
will overwrite the others' static area.

On some shared memory machines (the KSR was one), one
could declare such a variable '_private static...' and
the compiler would arrange to create a copy of the static
for each process, preventing the overwrite.  Any pointers
to a convenient way to do this on an SGI  appreciated.

Please respond via email (nurkkala@cs.umn.edu).

thanks,
nurk.

