Ignore:
Timestamp:
May 4, 2010, 5:34:33 AM (15 years ago)
Author:
[email protected]
Message:

2010-05-04 Gustavo Noronha Silva <[email protected]>

Reviewed by Darin Adler.

Does not work on SPARC because of alignment issues
https://bugs.webkit.org/show_bug.cgi?id=38455

Use AllocAlignmentInteger instead of void* on pageheap_memory to
avoid crashing at runtime in some architectures. Investigated by
Mike Hommey <[email protected]>, change suggested by Darin Adler.

  • wtf/FastMalloc.cpp:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/FastMalloc.cpp

    r58730 r58753  
    23392339// Page-level allocator
    23402340static SpinLock pageheap_lock = SPINLOCK_INITIALIZER;
    2341 static void* pageheap_memory[(sizeof(TCMalloc_PageHeap) + sizeof(void*) - 1) / sizeof(void*)];
     2341static AllocAlignmentInteger pageheap_memory[(sizeof(TCMalloc_PageHeap) + sizeof(AllocAlignmentInteger) - 1) / sizeof(AllocAlignmentInteger)];
    23422342static bool phinited = false;
    23432343
Note: See TracChangeset for help on using the changeset viewer.