|
From: Ben M. <ben...@mi...> - 2004-09-18 15:07:56
|
Hi, What happens when you valgrind an application that uses the *shm_open, shmat, shmop, *etc, system calls? I *assume* the 'shared memory' is managed within Valgrind's virtual machine memory subsystem and is hence *not* visible to other normal processes also running on the same physical CPU. Is this true? Please reply directly (in addition to the list) because I'm not subscribed to valgrind-users. Thanks! Ben McCann P.S. The platform is a P4 with Linux 2.4.26. |
|
From: Tom H. <th...@cy...> - 2004-09-18 17:25:56
|
In message <414...@mi...>
Ben McCann <ben...@mi...> wrote:
> What happens when you valgrind an application that uses the *shm_open,
> shmat, shmop, *etc, system calls?
Nothing very special. They are system calls and valgrind checks
them like it checks other system calls. Obviously there is a slight
complication in that it has to make sure it notices when a piece
of memory is mapped or unmapped via such a call.
The only issue is that valgrind obviously can't tell when another
process writes to the shared memory so can't track the definedness
of the memory fully.
> I *assume* the 'shared memory' is managed within Valgrind's virtual
> machine memory subsystem and is hence *not* visible to other normal
> processes also running on the same physical CPU.
Not at all. There would be no point in implementing them at all in
that case as no sane program is going to use shared memory to talk
to itself.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|