Thanks for the reply.
Okay, so I stuffed up with the malloc. But the pth-manual pages say that
this arg isn't used if it is NULL and when I try that it has the same
effect...
Lachlan
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Matt Sherer
Sent: Wednesday, 18 October 2000 14:26
To: [EMAIL PROTECTED]
Subject: Re: memory fault on OpenServer
you're losing the address of the pointer your malloced,then setting it
to another address. fine, in this case, not worrying about leaks. but
then you pass the address of the referencing pointer to the function,
dereferencing it twice. you don't use the pointer in the function,
which explains why it MAY work. hpux's compiler might be more forgiving
than sco's. i'm betting you hit an artifact of the assembler generated
by the compiler, and it happens to not die on hpux, although i believe
it should. take this with a grain of salt, i've been awake way too
long, but i would remove the malloc, just declare the integer, and pass
the address of the integer to the function, casted if need be.
--Matt
______________________________________________________________________
GNU Portable Threads (Pth) http://www.gnu.org/software/pth/
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager (Majordomo) [EMAIL PROTECTED]