[EFL][GTK] Use bmalloc instead of tcmalloc
authorgyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Feb 2015 12:15:23 +0000 (12:15 +0000)
committergyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Feb 2015 12:15:23 +0000 (12:15 +0000)
commitf9c792b48e648b6832a480e2d5fbe28601187499
tree79aacba09bc5ea2d7ffce0ef6f9136620886c4d7
parent8eb37e87de90e88b332216ed3d442e312fb2d048
[EFL][GTK] Use bmalloc instead of tcmalloc
https://bugs.webkit.org/show_bug.cgi?id=140162

Reviewed by Carlos Garcia Campos.

.:

Add bmalloc directory to build list.

* CMakeLists.txt: Define BMALLOC_DIR directory.
* Source/CMakeLists.txt: Add bmalloc path to sub-directories list.

Source/bmalloc:

Support to use bmalloc on EFL and GTK ports.

* CMakeLists.txt: Added.
* bmalloc/Allocator.cpp:
(bmalloc::Allocator::allocate):
    Fix unused return value caused by posix_memalign().
* bmalloc/AsyncTask.h:
* bmalloc/BoundaryTag.h:
(bmalloc::BoundaryTag::clear):
* bmalloc/Chunk.h:
    Change Traits::Page with Traits::PageType in order to fix
    -fpermitive build error on EFL and GTK port.
* bmalloc/EndTag.h:
(bmalloc::EndTag::operator=):
* bmalloc/Line.h: ditto.
* bmalloc/MediumTraits.h:
* bmalloc/Page.h: ditto.
* bmalloc/PerThread.h:
    EFL port doesn't support __has_include definition yet.
    Define HAVE_PTHREAD_MACHDEP_H according to check if __has_include is supported.
* bmalloc/SmallTraits.h: ditto.
* bmalloc/VMAllocate.h:
(bmalloc::vmDeallocatePhysicalPages):
(bmalloc::vmAllocatePhysicalPages):
* bmalloc/Vector.h:
(bmalloc::Vector<T>::push):
(bmalloc::Vector<T>::reallocateBuffer):

Source/WTF:

* wtf/CMakeLists.txt:
* wtf/FastMalloc.cpp:
    Enable bmalloc on GTK ports, but EFL port will enable it when bmalloc supports
    memory statistics.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
CMakeLists.txt
ChangeLog
Source/CMakeLists.txt
Source/WTF/ChangeLog
Source/WTF/wtf/CMakeLists.txt
Source/WTF/wtf/FastMalloc.cpp
Source/bmalloc/CMakeLists.txt [new file with mode: 0644]
Source/bmalloc/ChangeLog
Source/bmalloc/bmalloc/Allocator.cpp
Source/bmalloc/bmalloc/AsyncTask.h
Source/bmalloc/bmalloc/BoundaryTag.h
Source/bmalloc/bmalloc/Chunk.h
Source/bmalloc/bmalloc/EndTag.h
Source/bmalloc/bmalloc/LargeChunk.h
Source/bmalloc/bmalloc/Line.h
Source/bmalloc/bmalloc/MediumTraits.h
Source/bmalloc/bmalloc/Page.h
Source/bmalloc/bmalloc/PerThread.h
Source/bmalloc/bmalloc/SmallTraits.h
Source/bmalloc/bmalloc/VMAllocate.h
Source/bmalloc/bmalloc/Vector.h