www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/15/04:01:04

Date: Wed, 15 Jul 1998 11:00:33 +0300 (IDT)
From: Kohn Emil Dan <emild AT cs DOT technion DOT ac DOT il>
Reply-To: Kohn Emil Dan <emild AT cs DOT technion DOT ac DOT il>
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
cc: djgpp AT delorie DOT com
Subject: Re: Copying memory to memory problems
In-Reply-To: <Pine.SUN.3.91.980714100716.6831B-100000@is>
Message-ID: <Pine.GSO.3.95-heb-2.07.980715105045.3424A-100000@csd>
MIME-Version: 1.0


On Tue, 14 Jul 1998, Eli Zaretskii wrote:
> 
> On Mon, 13 Jul 1998, Kohn Emil Dan wrote:
> 
> > On the other hand memmove() guarantees that the copying process takes
> > place as if the source was copied to a temporary area that does not
> > overlap with any of the parameters and then the object is copied from the
> > temporary area back to the destination.

> 
> I doubt that any reasonable implementation of `memmove' realy does
> this double copy thing.  DJGPP's implementation surely doesn't.  All
> you need to do is to determine whether the source pointer is greater
> or less than the destination pointer, and copy from the beginning or
> the end of the source, accordingly.
> 

Hi!

You are right. Note the AS IF from my post. I was only explaing
the semantics of this function, not its actual implementation. There might
be implementations which implement this function as you have described,
and some which implement it otherwise. You shouldn't care at all about
it.

					Regards,

						Emil



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019