[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
zoltan at webkit.org
zoltan at webkit.org
Wed Dec 22 14:42:35 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 7c5b049f75506f13f8cc5b6f08a365ff968a5bdc
Author: zoltan at webkit.org <zoltan at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Oct 18 07:25:32 2010 +0000
Change FastAllocBase implementation into a macro
https://bugs.webkit.org/show_bug.cgi?id=42998
Reviewed by Darin Adler.
It was investigated in bug #33896 that inheriting classes from FastAllocBase
can result in objects getting larger which leads to memory regressions.
Using a macro instead of inheriting classes from FastAllocBase would solve the issue.
* wtf/FastAllocBase.h: Add a WTF_MAKE_FAST_ALLOCATED macro
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 190847e..86061ec 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-18 Zoltan Horvath <zoltan at webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Change FastAllocBase implementation into a macro
+ https://bugs.webkit.org/show_bug.cgi?id=42998
+
+ It was investigated in bug #33896 that inheriting classes from FastAllocBase
+ can result in objects getting larger which leads to memory regressions.
+ Using a macro instead of inheriting classes from FastAllocBase would solve the issue.
+
+ * wtf/FastAllocBase.h: Add a WTF_MAKE_FAST_ALLOCATED macro
+
2010-10-17 Oliver Hunt <oliver at apple.com>
Reviewed by Sam Weinig.
diff --git a/JavaScriptCore/wtf/FastAllocBase.h b/JavaScriptCore/wtf/FastAllocBase.h
index 81b1de0..bb1825e 100644
--- a/JavaScriptCore/wtf/FastAllocBase.h
+++ b/JavaScriptCore/wtf/FastAllocBase.h
@@ -85,38 +85,41 @@
namespace WTF {
- class FastAllocBase {
- public:
- // Placement operator new.
- void* operator new(size_t, void* p) { return p; }
- void* operator new[](size_t, void* p) { return p; }
-
- void* operator new(size_t size)
- {
- void* p = fastMalloc(size);
- fastMallocMatchValidateMalloc(p, Internal::AllocTypeClassNew);
- return p;
- }
-
- void operator delete(void* p)
- {
- fastMallocMatchValidateFree(p, Internal::AllocTypeClassNew);
- fastFree(p);
- }
-
- void* operator new[](size_t size)
- {
- void* p = fastMalloc(size);
- fastMallocMatchValidateMalloc(p, Internal::AllocTypeClassNewArray);
- return p;
- }
-
- void operator delete[](void* p)
- {
- fastMallocMatchValidateFree(p, Internal::AllocTypeClassNewArray);
- fastFree(p);
- }
- };
+#define WTF_MAKE_FAST_ALLOCATED \
+public: \
+ void* operator new(size_t, void* p) { return p; } \
+ void* operator new[](size_t, void* p) { return p; } \
+ \
+ void* operator new(size_t size) \
+ { \
+ void* p = ::WTF::fastMalloc(size); \
+ ::WTF::fastMallocMatchValidateMalloc(p, ::WTF::Internal::AllocTypeClassNew); \
+ return p; \
+ } \
+ \
+ void operator delete(void* p) \
+ { \
+ ::WTF::fastMallocMatchValidateFree(p, ::WTF::Internal::AllocTypeClassNew); \
+ ::WTF::fastFree(p); \
+ } \
+ \
+ void* operator new[](size_t size) \
+ { \
+ void* p = ::WTF::fastMalloc(size); \
+ ::WTF::fastMallocMatchValidateMalloc(p, ::WTF::Internal::AllocTypeClassNewArray); \
+ return p; \
+ } \
+ \
+ void operator delete[](void* p) \
+ { \
+ ::WTF::fastMallocMatchValidateFree(p, ::WTF::Internal::AllocTypeClassNewArray); \
+ ::WTF::fastFree(p); \
+ } \
+private:
+
+class FastAllocBase {
+ WTF_MAKE_FAST_ALLOCATED
+};
// fastNew / fastDelete
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list