Ignore:
Timestamp:
Oct 3, 2005, 10:57:13 PM (20 years ago)
Author:
mjs
Message:

Patch from George Staikos <[email protected]>, reviewed and tweaked a bit by me.

  • more Linux build fixes
  • kjs/operations.cpp:
  • kxmlcore/FastMalloc.h:
  • kxmlcore/TCSystemAlloc.cpp: (TCMalloc_SystemAlloc):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kxmlcore/TCSystemAlloc.cpp

    r10701 r10724  
    6767// the mmap address space (1300MBish) are disjoint, so we need both allocators
    6868// to get as much virtual memory as possible.
     69#ifndef KXC_CHANGES
    6970static bool use_devmem = false;
     71#endif
    7072static bool use_sbrk = false;
    7173static bool use_mmap = true;
     
    169171#endif /* HAVE_MMAP */
    170172
     173#ifndef KXC_CHANGES
    171174static void* TryDevMem(size_t size, size_t alignment) {
    172175  static bool initialized = false;
     
    239242  return reinterpret_cast<void*>(ptr);
    240243}
     244#endif
    241245
    242246void* TCMalloc_SystemAlloc(size_t size, size_t alignment) {
     
    255259  // more trying all allocators even if they failed before.
    256260  for (int i = 0; i < 2; i++) {
     261
     262#ifndef KXC_CHANGES
    257263    if (use_devmem && !devmem_failure) {
    258264      void* result = TryDevMem(size, alignment);
    259265      if (result != NULL) return result;
    260266    }
     267#endif
    261268   
    262269#ifdef HAVE_SBRK
Note: See TracChangeset for help on using the changeset viewer.