Commit 322813f7 authored by ddkilzer@apple.com's avatar ddkilzer@apple.com

releaseFastMallocFreeMemory() should always be defined

        Reviewed by Darin.

        * JavaScriptCore.exp: Changed to export C++ binding for
        WTF::releaseFastMallocFreeMemory() instead of C binding for
        releaseFastMallocFreeMemory().
        * wtf/FastMalloc.cpp: Moved definitions of
        releaseFastMallocFreeMemory() to be in the WTF namespace
        regardless whether FORCE_SYSTEM_MALLOC is defined.
        * wtf/FastMalloc.h: Moved releaseFastMallocFreeMemory() from
        extern "C" binding to WTF::releaseFastMallocFreeMemory().



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35055 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 54b5cc13
2008-07-07 David Kilzer <ddkilzer@apple.com>
releaseFastMallocFreeMemory() should always be defined
Reviewed by Darin.
* JavaScriptCore.exp: Changed to export C++ binding for
WTF::releaseFastMallocFreeMemory() instead of C binding for
releaseFastMallocFreeMemory().
* wtf/FastMalloc.cpp: Moved definitions of
releaseFastMallocFreeMemory() to be in the WTF namespace
regardless whether FORCE_SYSTEM_MALLOC is defined.
* wtf/FastMalloc.h: Moved releaseFastMallocFreeMemory() from
extern "C" binding to WTF::releaseFastMallocFreeMemory().
2008-07-07 Cameron Zwarich <cwzwarich@uwaterloo.ca>
Reviewed by Geoff.
......@@ -244,6 +244,7 @@ __ZN3WTF16callOnMainThreadEPFvPvES0_
__ZN3WTF16fastZeroedMallocEm
__ZN3WTF19initializeThreadingEv
__ZN3WTF23waitForThreadCompletionEjPPv
__ZN3WTF27releaseFastMallocFreeMemoryEv
__ZN3WTF28setMainThreadCallbacksPausedEb
__ZN3WTF5Mutex4lockEv
__ZN3WTF5Mutex6unlockEv
......@@ -315,4 +316,3 @@ __ZTVN3KJS8JSObjectE
_jscore_collector_introspection
_jscore_fastmalloc_introspection
_kJSClassDefinitionEmpty
_releaseFastMallocFreeMemory
// 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
......@@ -196,11 +197,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.
......@@ -208,7 +207,7 @@ void releaseFastMallocFreeMemory() { }
extern "C" const int jscore_fastmalloc_introspection = 0;
#endif
#else
#else // FORCE_SYSTEM_MALLOC
#if HAVE(STDINT_H)
#include <stdint.h>
......@@ -3687,18 +3686,16 @@ void FastMallocZone::init()
static FastMallocZone zone(pageheap, &thread_heaps, static_cast<TCMalloc_Central_FreeListPadded*>(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
// -*- 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment