httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r382799 - /httpd/httpd/trunk/modules/ssl/ssl_scache_shmcb.c
Date Fri, 03 Mar 2006 13:11:40 GMT
Author: jorton
Date: Fri Mar  3 05:11:39 2006
New Revision: 382799

URL: http://svn.apache.org/viewcvs?rev=382799&view=rev
Log:
* modules/ssl/ssl_scache_shmcb.c (shmcb_safe_clear): Mark with
"noinline" attribute for GCC > 3.

PR: 38838

Modified:
    httpd/httpd/trunk/modules/ssl/ssl_scache_shmcb.c

Modified: httpd/httpd/trunk/modules/ssl/ssl_scache_shmcb.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/ssl/ssl_scache_shmcb.c?rev=382799&r1=382798&r2=382799&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_scache_shmcb.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_scache_shmcb.c Fri Mar  3 05:11:39 2006
@@ -234,8 +234,13 @@
                         (const unsigned char *)(&tmp_time)); \
         } while(0)
 
-/* This is necessary simply so that the size passed to memset() is not a
- * compile-time constant, preventing the compiler from optimising it. */
+/* This is used to persuade the compiler from using an inline memset()
+ * which has no respect for alignment, since the size parameter is
+ * often a compile-time constant.  GCC >= 4 will aggressively inline
+ * static functions, so it's marked as explicitly not-inline. */
+#if defined(__GNUC__) && __GNUC__ > 3
+__attribute__((__noinline__))
+#endif
 static void shmcb_safe_clear(void *ptr, size_t size)
 {
         memset(ptr, 0, size);



Mime
View raw message