is memcpy a system call?
Hi, everyone
Is memcpy a system call?
Thanks in advnace,
Best Regards,
J.Hwna Kim
Quoted 5 lines
Is memcpy a system call?
Thanks in advnace,
memcpy is *not* a system call. It is a standard C library function.
System calls are those where you enter the kernel mode and ask your OS to do something for you (like read/write from disk).
For memory copy you don't need to take the service of OS.
Hi
Memcpy is both- a system call as well as a user library function. Implementation differs
Regards
Siddharth
Quoted 12 lines · J.Hwan Kim
Hi, everyone
Is memcpy a system call?
Thanks in advnace,
Best Regards,
J.Hwna Kim
Quoted 5 lines
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120608/4ed79d9e/attachment.html
Quoted 4 lines · siddharth saxena
Hi
Memcpy is both- a system call as well as a user library function. Implementation differs
Can you give me an example of memcpy being implemented as a syscall?
Thanks,
Jonathan Neusch?fer
Hi!
On Fre, 2012-06-08 at 20:51 +0530, siddharth saxena wrote:
[...]
Quoted 2 lines
Memcpy is both- a system call as well as a user library function. Implementation differs
What makes you believe this?
Bernd
Signature · 2 lines
Bernd Petrovitsch Email : bernd at petrovitsch.priv.at
LUGA : http://www.luga.atQuoted 8 lines · J.Hwan Kim
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
Quoted 4 lines · J.Hwan Kim
Hi, everyone
Is memcpy a system call?
"Use the force, read the source"
uclibc:
http://git.uclibc.org/uClibc/tree/libc/string/generic/memcpy.c
Which means: No, memcpy (meaning the userspace function that gets included by "string.h") is *not* a system call.
Hope this helps,
Ezequiel.