net: alignment problem in icmp code
Subsystems (2)
-------- Пересылаемое сообщение -------- 21.10.07, 23:48, David Miller ([email protected]):
From: Pierre Ossman <[email protected]>
Date: Sun, 21 Oct 2007 11:34:05 +0200
Quoted 3 lines
Inlining isn't the problem, but the defined semantics of assignment versus
memcpy().memcpy()must work on any region of memory, whilst assignment must only work on a properly aligned object.
You are missing a crucial point.
The compiler may emit the same exact loads and stores when it inlines memcpy() if it "knows" the objects are aligned properly. And it very much will do this.
If the compiler is calling memcpy() in your build, it's only because gcc believes the the object is too big to optimally memcpy() inline. -
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
-------- Завершение пересылаемого сообщения --------
--
Яндекс.Открытки - Анонсы новых открыток: http://cards.yandex.ru/subscribe.xml