Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for June 20, 2013
Pencil, Pencil, and Pencil
Dividing the Linux desktop
LWN.net Weekly Edition for June 13, 2013
A report from pgCon 2013
Glibc change exposing bugs
Posted Nov 10, 2010 20:38 UTC (Wed) by neilbrown (subscriber, #359)
So implementing memcpy as memmove - which Linus says in the bugzilla threads is largely what the kernel does - sounds very sensible. memmove is much harder to misuse.
Posted Nov 13, 2010 1:07 UTC (Sat) by rriggs (subscriber, #11598)
Which one do you think your average C programmer will choose?
Which one do you think new programmers are taught to use (in schools that still teach C programming)?
Posted Nov 13, 2010 2:52 UTC (Sat) by neilbrown (subscriber, #359)
Posted Nov 15, 2010 16:43 UTC (Mon) by renox (subscriber, #23785)
And memcpy should also be named as mem_unsafe_copy, but yes if you tell developers to use safe function by default and to optimize only when they can show benchmarks that the optimisation will make a difference, then yes, you'd get probably better software (if a bit slower).
Posted Nov 25, 2010 15:13 UTC (Thu) by Spudd86 (guest, #51683)
The problem is that most apps don't actually need the those bits, so they just needlessly break software like pulseaudio (and also break on bluetooth audio too).
Pulseaudio does use those unemulatable APIs, but it also falls back if they don't work, and it has good reasons to use those APIs (so it can hand over large chunks of audio data, but still be able to decide it wants to change that same data later (if for example something else starts playing audio), this saves you power because pulse won't wake your CPU as much, but it also uses APIs that don't emulate well AND until pulse came along nobody ever tried to do that sort of thing so it broke)
Posted Nov 25, 2010 16:07 UTC (Thu) by foom (subscriber, #14868)
Posted Nov 25, 2010 16:39 UTC (Thu) by Spudd86 (guest, #51683)
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds