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

Any correlation between malloc return value and physical location?



I'm pretty sure that the answer to this is "no", but:

Is there any relationship between the address returned by malloc(3) and the
physical address of the block of RAM?  I'm almost positive that there isn't
- after all, there's not much chance of a block being swapped out and back
in to the same location - but I'm curious.

If I'm correct and there is no correlation, then my next question is:

If a identical programs (same data, different files) are launched at the
same time so that each copy in memory is identical, and they all call
malloc(some_constant), do they all get the same return address from malloc()
or do they get different answers?
-- 
Kirk Strauser
In Googlis non est, ergo non est.

Attachment: pgpfxCwGWPCi1.pgp
Description: PGP signature


Reply to: