is memcpy a system call?

Jonathan Neuschäfer j.neuschaefer at gmx.net
Fri Jun 8 17:48:15 EDT 2012


On Sat, Jun 09, 2012 at 12:11:36AM +0900, J.Hwan Kim wrote:
> Hi, everyone
> 
> Is memcpy a system call?
> 
> Thanks in advnace,
> 
> Best Regards,
> J.Hwna Kim

"strace" is a good tool to find out which system calls a program is
doing.

To answer your question, I don't think it makes much sense to implement
memcpy as a syscall, because entering kernel mode is usually relatively
expensive and I can't think of any kernel mode-only memcpy optimizations
(and optimizations are the only reason to do a user space memcpy in
kernel space I can think of).

HTH,
	Jonathan Neuschäfer



More information about the Kernelnewbies mailing list