[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Any correlation between malloc return value and physical location?

At 2003-10-13T08:10:47Z, Rob Weir <rweir@ertius.org> writes:

> Kinda tangential, but if you run multiple copies of the same program (==
> from the same file on disk), they share memory for the actual code.

I wasn't very clear when I wrote that.  I was think of a case like:

   $ gcc -o alloctest alloctest.c
   $ cp alloctest program1
   $ cp alloctest program2
   $ cp alloctest program3

where the three programs were identical but came from different files
(specifically to keep the VM system from optimizing away the interesting

Anyway, thanks to everyone who responded.  I thought that's the way it would
work, but I don't know anything about the Linux implementation details to
feel speek confidently about it.
Kirk Strauser
In Googlis non est, ergo non est.

Attachment: pgp7jNyRQrIx5.pgp
Description: PGP signature

Reply to: