Re: svn commit: r253636 - head/sys/vm

2013-07-26 Thread David Chisnall
On 25 Jul 2013, at 16:10, m...@freebsd.org wrote: Isn't that a compiler bug? memset(p, 0, n) is the same as bzero(p, n). Why would the compiler warn on one and not the other? They are different. memcpy is defined by the C standard. bzero is defined by POSIX. When you are compiling C

Re: svn commit: r253636 - head/sys/vm

2013-07-25 Thread Bruce Evans
On Thu, 25 Jul 2013, Tim Kientzle wrote: Log: Clear entire map structure including locks so that the locks don't accidentally appear to have been already initialized. In particular, this fixes a consistent kernel crash on armv6 with: panic: lock vm map (user) 0xc09cc050 already

Re: svn commit: r253636 - head/sys/vm

2013-07-25 Thread Hans Petter Selasky
On 07/25/13 09:26, Bruce Evans wrote: On Thu, 25 Jul 2013, Tim Kientzle wrote: Log: Clear entire map structure including locks so that the locks don't accidentally appear to have been already initialized. In particular, this fixes a consistent kernel crash on armv6 with: panic: lock

Re: svn commit: r253636 - head/sys/vm

2013-07-25 Thread David Chisnall
On 25 Jul 2013, at 09:11, Hans Petter Selasky h...@bitfrost.no wrote: The structure looks like some size, so bzero() might run faster than memset() depending on the compiler settings. Should be profiled before changed! They will generate identical code for small structures with known sizes.

Re: svn commit: r253636 - head/sys/vm

2013-07-25 Thread mdf
On Thu, Jul 25, 2013 at 4:43 AM, David Chisnall thera...@freebsd.orgwrote: However(), memset is to be preferred in this idiom because the compiler provides better diagnostics in the case of error: bzero.c:9:22: warning: 'memset' call operates on objects of type 'struct foo' while the

Re: svn commit: r253636 - head/sys/vm

2013-07-25 Thread Bruce Evans
On Thu, 25 Jul 2013, David Chisnall wrote: On 25 Jul 2013, at 09:11, Hans Petter Selasky h...@bitfrost.no wrote: The structure looks like some size, so bzero() might run faster than memset() depending on the compiler settings. Should be profiled before changed! They will generate identical

svn commit: r253636 - head/sys/vm

2013-07-24 Thread Tim Kientzle
Author: kientzle Date: Thu Jul 25 03:48:37 2013 New Revision: 253636 URL: http://svnweb.freebsd.org/changeset/base/253636 Log: Clear entire map structure including locks so that the locks don't accidentally appear to have been already initialized. In particular, this fixes a consistent