At 12:46 PM +0100 2001/07/14, Igor Mozolevsky wrote:
>>Why would a function
>>*move* memory; from an implementation perspective, it would be less
>>efficient than copying it. I can't conceive of any possible gain to be
>>had by moving memory; what would the system leave behind in the old
>>location?
>
>However, that is EXACTLY what the SDK reference implied... If you read it, you'll see
>for your self...
The SDK references says:
---
Move a range of memory to another range.
...
Handles overlapping ranges.
For operations where the destination is in a data heap, see DmSet, DmWrite, and
related functions.
---
Nowhere does it imply the source memory area is modified.
Your misconception is based on the concept of moving physical objects from one
location in space to another, which does in fact change the characteristics of the
source location. I agree with your assertion that a better name for the routine would
be MemCopy not MemMove. But rather than beat a dead horse... just #define
MemCopy(d,s,c) MemMove(d,s,c)
Regards,
Jim Schram
Palm Incorporated
Partner Engineering
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/