From f4e78d344e5c5fcc489184d56be5bfd4ae94427e Mon Sep 17 00:00:00 2001 From: Apple Date: Wed, 20 Aug 2008 20:26:13 +0000 Subject: [PATCH] JavaScriptCore-466.1.tar.gz --- JavaScriptCore.exp | 2 +- wtf/FastMalloc.cpp | 17 +++++++---------- wtf/FastMalloc.h | 10 +++------- 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/JavaScriptCore.exp b/JavaScriptCore.exp index 9a5750a..3ee8f3b 100644 --- a/JavaScriptCore.exp +++ b/JavaScriptCore.exp @@ -232,6 +232,7 @@ __ZN3WTF10fastCallocEmm __ZN3WTF10fastMallocEm __ZN3WTF11fastReallocEPvm __ZN3WTF16fastZeroedMallocEm +__ZN3WTF27releaseFastMallocFreeMemoryEv __ZN3WTF8fastFreeEPv __ZNK3KJS11PropertyMap3getERKNS_10IdentifierE __ZNK3KJS11PropertyMap4saveERNS_15SavedPropertiesE @@ -291,4 +292,3 @@ _kjs_strtod _JSLockDropAllLocks _JSLockRecoverAllLocks _JSSetJavaScriptCollectionThread -_releaseFastMallocFreeMemory diff --git a/wtf/FastMalloc.cpp b/wtf/FastMalloc.cpp index 7d17907..b44035c 100644 --- a/wtf/FastMalloc.cpp +++ b/wtf/FastMalloc.cpp @@ -1,5 +1,6 @@ // Copyright (c) 2005, 2007, Google Inc. // All rights reserved. +// Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -194,11 +195,9 @@ void *fastRealloc(void* p, size_t n) return realloc(p, n); } -} // namespace WTF - -extern "C" { void releaseFastMallocFreeMemory() { } -} + +} // namespace WTF #if PLATFORM(DARWIN) // This symbol is present in the JavaScriptCore exports file even when FastMalloc is disabled. @@ -206,7 +205,7 @@ void releaseFastMallocFreeMemory() { } extern "C" const int jscore_fastmalloc_introspection = 0; #endif -#else +#else // FORCE_SYSTEM_MALLOC #if HAVE(STDINT_H) #include @@ -3632,18 +3631,16 @@ void FastMallocZone::init() static FastMallocZone zone(pageheap, &thread_heaps, static_cast(central_cache)); } -extern "C" { +#endif + void releaseFastMallocFreeMemory() { SpinLockHolder h(&pageheap_lock); pageheap->ReleaseFreePages(); } -} - -#endif #if WTF_CHANGES } // namespace WTF #endif -#endif // USE_SYSTEM_MALLOC +#endif // FORCE_SYSTEM_MALLOC diff --git a/wtf/FastMalloc.h b/wtf/FastMalloc.h index ecce312..2b3d891 100644 --- a/wtf/FastMalloc.h +++ b/wtf/FastMalloc.h @@ -1,7 +1,5 @@ -// -*- mode: c++; c-basic-offset: 4 -*- /* - * This file is part of the KDE libraries - * Copyright (C) 2005 Apple Computer, Inc. + * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -40,6 +38,8 @@ namespace WTF { void fastMallocAllow(); #endif + void releaseFastMallocFreeMemory(); + } // namespace WTF using WTF::fastMalloc; @@ -70,10 +70,6 @@ WTF_PRIVATE_INLINE void* operator new(size_t s) { return fastMalloc(s); } WTF_PRIVATE_INLINE void operator delete(void* p) { fastFree(p); } WTF_PRIVATE_INLINE void* operator new[](size_t s) { return fastMalloc(s); } WTF_PRIVATE_INLINE void operator delete[](void* p) { fastFree(p); } - -extern "C" { -void releaseFastMallocFreeMemory(); -} #endif #endif // _CRTDBG_MAP_ALLOC -- 2.45.2