[llvm-commits] [llvm] r79472 - /llvm/trunk/lib/System/Unix/Process.inc
Chris Lattner
clattner at apple.com
Wed Aug 19 16:08:01 PDT 2009
On Aug 19, 2009, at 2:48 PM, Owen Anderson wrote:
> Author: resistor
> Date: Wed Aug 19 16:48:34 2009
> New Revision: 79472
>
> URL: http://llvm.org/viewvc/llvm-project?rev=79472&view=rev
> Log:
> Get rid of a helgrind warning. If this is _actually_ a performance
> problem,
> we can find a way to cache the answer that isn't racy.
Hi Owen,
We really don't want to do a syscall every time this function is called.
-Chris
>
> Modified:
> llvm/trunk/lib/System/Unix/Process.inc
>
> Modified: llvm/trunk/lib/System/Unix/Process.inc
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Unix/Process.inc?rev=79472&r1=79471&r2=79472&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/System/Unix/Process.inc (original)
> +++ llvm/trunk/lib/System/Unix/Process.inc Wed Aug 19 16:48:34 2009
> @@ -46,11 +46,11 @@
> // On Cygwin, getpagesize() returns 64k but the page size for the
> purposes of
> // memory protection and mmap() is 4k.
> // See http://www.cygwin.com/ml/cygwin/2009-01/threads.html#00492
> - static const int page_size = 0x1000;
> + const int page_size = 0x1000;
> #elif defined(HAVE_GETPAGESIZE)
> - static const int page_size = ::getpagesize();
> + const int page_size = ::getpagesize();
> #elif defined(HAVE_SYSCONF)
> - static long page_size = ::sysconf(_SC_PAGE_SIZE);
> + long page_size = ::sysconf(_SC_PAGE_SIZE);
> #else
> #warning Cannot get the page size on this machine
> #endif
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list