Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving Data in Memory Part II



On Oct 22, 2004, at 09:45 PM, Gohara, David wrote:

  Thanks for the responses.  It would appear that it is indeed a case of malloc.  One thing I noticed and I've never done the test before is that the same code compiled on a different machine gives me the exact same memory addresses.  For example, if I compile and run the code on my G4 laptop or G5 desktop.  How can that be?  I may be misunderstanding something with regards to memory addresses but shouldn't it be very unlikely for memory allocations to be identical on two different machines?

As long as the machine code that is run is the same (same gcc version and compiler flags, same source, etc) then there is no reason for anything to change. After all, malloc() an algorithm to allocate memory -- it would be very strange indeed if it produced different results on the same (machine) code with the same starting point.
--
Reality is what, when you stop believing in it, doesn't go away.
Failure is not an option. It is a privilege reserved for those who try.


David Duncan

_______________________________________________
Do not post admin requests to the list. They will be ignored.
PerfOptimization-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/perfoptimization-dev/email@hidden

This email sent to email@hidden
References: 
 >RE: Moving Data in Memory Part II (From: "Gohara, David " <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.