[webkit-changes] cvs commit: JavaScriptCore/kxmlcore FastMalloc.h TCSystemAlloc.cpp

Maciej mjs at opensource.apple.com
Mon Oct 3 22:57:14 PDT 2005


mjs         05/10/03 22:57:14

  Modified:    .        ChangeLog
               kjs      operations.cpp
               kxmlcore FastMalloc.h TCSystemAlloc.cpp
  Log:
          Patch from George Staikos <staikos at kde.org>, reviewed and tweaked a bit by me.
  
  	- more Linux build fixes
  
          * kjs/operations.cpp:
          * kxmlcore/FastMalloc.h:
          * kxmlcore/TCSystemAlloc.cpp:
          (TCMalloc_SystemAlloc):
  
  Revision  Changes    Path
  1.852     +11 -0     JavaScriptCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/ChangeLog,v
  retrieving revision 1.851
  retrieving revision 1.852
  diff -u -r1.851 -r1.852
  --- ChangeLog	4 Oct 2005 01:43:57 -0000	1.851
  +++ ChangeLog	4 Oct 2005 05:57:09 -0000	1.852
  @@ -2,6 +2,17 @@
   
           Patch from George Staikos <staikos at kde.org>, reviewed and tweaked a bit by me.
   
  +	- more Linux build fixes
  +	
  +        * kjs/operations.cpp:
  +        * kxmlcore/FastMalloc.h:
  +        * kxmlcore/TCSystemAlloc.cpp:
  +        (TCMalloc_SystemAlloc):
  +
  +2005-10-03  Maciej Stachowiak  <mjs at apple.com>
  +
  +        Patch from George Staikos <staikos at kde.org>, reviewed and tweaked a bit by me.
  +
   	http://bugzilla.opendarwin.org/show_bug.cgi?id=5174
   	Add support for compiling on Linux (likely to help for other POSIX systems too)
   
  
  
  
  1.12      +1 -1      JavaScriptCore/kjs/operations.cpp
  
  Index: operations.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kjs/operations.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- operations.cpp	3 Oct 2005 21:11:50 -0000	1.11
  +++ operations.cpp	4 Oct 2005 05:57:12 -0000	1.12
  @@ -268,4 +268,4 @@
     return jsNumber(result, resultKnownToBeInteger);
   }
   
  -}
  \ No newline at end of file
  +}
  
  
  
  1.3       +7 -0      JavaScriptCore/kxmlcore/FastMalloc.h
  
  Index: FastMalloc.h
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kxmlcore/FastMalloc.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FastMalloc.h	3 Oct 2005 21:11:58 -0000	1.2
  +++ FastMalloc.h	4 Oct 2005 05:57:13 -0000	1.3
  @@ -24,6 +24,7 @@
   #define KXMLCORE_FAST_MALLOC_H
   
   #include <stdlib.h>
  +#include <new>
   
   namespace KXMLCore {
   
  @@ -40,8 +41,14 @@
   using KXMLCore::fastFree;
   
   #if __GNUC__
  +
  +#if __APPLE__
   #define KXMLCORE_PRIVATE_INLINE __private_extern__ inline __attribute__((always_inline))
   #else
  +#define KXMLCORE_PRIVATE_INLINE inline __attribute__((always_inline))
  +#endif
  +
  +#else
   #define KXMLCORE_PRIVATE_INLINE inline
   #endif
   
  
  
  
  1.3       +7 -0      JavaScriptCore/kxmlcore/TCSystemAlloc.cpp
  
  Index: TCSystemAlloc.cpp
  ===================================================================
  RCS file: /cvs/root/JavaScriptCore/kxmlcore/TCSystemAlloc.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TCSystemAlloc.cpp	3 Oct 2005 21:11:58 -0000	1.2
  +++ TCSystemAlloc.cpp	4 Oct 2005 05:57:13 -0000	1.3
  @@ -66,7 +66,9 @@
   // For 2.2 kernels, it looks like the sbrk address space (500MBish) and
   // the mmap address space (1300MBish) are disjoint, so we need both allocators
   // to get as much virtual memory as possible.
  +#ifndef KXC_CHANGES
   static bool use_devmem = false;
  +#endif
   static bool use_sbrk = false;
   static bool use_mmap = true;
   
  @@ -168,6 +170,7 @@
   
   #endif /* HAVE_MMAP */
   
  +#ifndef KXC_CHANGES
   static void* TryDevMem(size_t size, size_t alignment) {
     static bool initialized = false;
     static off_t physmem_base;  // next physical memory address to allocate
  @@ -238,6 +241,7 @@
     
     return reinterpret_cast<void*>(ptr);
   }
  +#endif
   
   void* TCMalloc_SystemAlloc(size_t size, size_t alignment) {
   #ifndef KXC_CHANGES
  @@ -254,10 +258,13 @@
     // Try twice, once avoiding allocators that failed before, and once
     // more trying all allocators even if they failed before.
     for (int i = 0; i < 2; i++) {
  +
  +#ifndef KXC_CHANGES
       if (use_devmem && !devmem_failure) {
         void* result = TryDevMem(size, alignment);
         if (result != NULL) return result;
       }
  +#endif
       
   #ifdef HAVE_SBRK
       if (use_sbrk && !sbrk_failure) {
  
  
  



More information about the webkit-changes mailing list