JavaScriptCore:
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Oct 2005 21:13:12 +0000 (21:13 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Oct 2005 21:13:12 +0000 (21:13 +0000)
        Reviewed by Darin.

<rdar://problem/4283967> REGRESSION: 3% regression on PLT from new FastMalloc
http://bugzilla.opendarwin.org/show_bug.cgi?id=5243

A number of optimizations to the new threadsafe malloc that make it actually as fast
as dlmalloc (I measured wrong before) and as memory-efficient as the system malloc.

- use fastMalloc for everything - it now gets applied to all new/delete allocations
via a private inline operator new that is now included into every file via config.h.

- tweaked some of the numeric parameters for size classes and amount of wasted memory
allowed per allocation - this saves on memory use and consequently improves speed.

- so long as the allocator is not being used on background threads, get the per-thread
cache from a global variable instead of from pthread_getspecific, since the latter is slow.

- inline more functions, and force the ones GCC refuses to inline with
attribute(always_inline), nearly all of these have one call site so inlining them has
to be a win.

- use some tricks to calculate allocation size more efficiently and fewer times for small
allocations, to avoid hitting the huge size table array.

- avoid hitting the per-thread cache on code paths that don't need it.

- implement inline assembly version of spinlock for PowerPC (was already done for x86)

        * bindings/NP_jsobject.cpp:
        * bindings/c/c_class.cpp:
        * bindings/c/c_instance.cpp:
        * bindings/c/c_runtime.cpp:
        * bindings/c/c_utility.cpp:
        * bindings/jni/jni_class.cpp:
        * bindings/jni/jni_instance.cpp:
        * bindings/jni/jni_jsobject.cpp:
        * bindings/jni/jni_objc.mm:
        * bindings/jni/jni_runtime.cpp:
        * bindings/jni/jni_utility.cpp:
        * bindings/npruntime.cpp:
        * bindings/objc/WebScriptObject.mm:
        * bindings/objc/objc_class.mm:
        * bindings/objc/objc_instance.mm:
        * bindings/objc/objc_runtime.mm:
        * bindings/objc/objc_utility.mm:
        * bindings/runtime.cpp:
        * bindings/runtime_array.cpp:
        * bindings/runtime_method.cpp:
        * bindings/runtime_object.cpp:
        * bindings/runtime_root.cpp:
        * bindings/testbindings.cpp:
        * bindings/testbindings.mm:
        * kjs/array_object.cpp:
        (ArrayInstanceImp::ArrayInstanceImp):
        (ArrayInstanceImp::~ArrayInstanceImp):
        (ArrayInstanceImp::resizeStorage):
        * kjs/bool_object.cpp:
        * kjs/collector.cpp:
        (KJS::Collector::registerThread):
        * kjs/config.h:
        * kjs/debugger.cpp:
        * kjs/error_object.cpp:
        * kjs/function.cpp:
        * kjs/function_object.cpp:
        * kjs/identifier.cpp:
        (KJS::Identifier::rehash):
        * kjs/internal.cpp:
        (KJS::Parser::saveNewNode):
        (KJS::clearNewNodes):
        * kjs/interpreter.cpp:
        * kjs/lexer.cpp:
        (Lexer::doneParsing):
        (Lexer::makeIdentifier):
        (Lexer::makeUString):
        * kjs/list.cpp:
        * kjs/math_object.cpp:
        * kjs/nodes.cpp:
        * kjs/nodes.h:
        * kjs/nodes2string.cpp:
        * kjs/number_object.cpp:
        (integer_part_noexp):
        (char_sequence):
        * kjs/object.cpp:
        * kjs/object_object.cpp:
        * kjs/property_map.cpp:
        * kjs/property_slot.cpp:
        * kjs/protected_values.cpp:
        (KJS::ProtectedValues::rehash):
        * kjs/reference.cpp:
        * kjs/reference_list.cpp:
        * kjs/regexp.cpp:
        * kjs/regexp_object.cpp:
        * kjs/scope_chain.cpp:
        * kjs/scope_chain.h:
        * kjs/string_object.cpp:
        * kjs/testkjs.cpp:
        * kjs/ustring.h:
        * kjs/value.cpp:
        * kxmlcore/Assertions.mm:
        * kxmlcore/FastMalloc.cpp:
        (KXMLCore::InitSizeClasses):
        (KXMLCore::DLL_IsEmpty):
        (KXMLCore::DLL_Prepend):
        (KXMLCore::TCMalloc_Central_FreeList::Insert):
        (KXMLCore::TCMalloc_Central_FreeList::Remove):
        (KXMLCore::TCMalloc_Central_FreeList::Populate):
        (KXMLCore::TCMalloc_ThreadCache::Allocate):
        (KXMLCore::TCMalloc_ThreadCache::FetchFromCentralCache):
        (KXMLCore::fastMallocRegisterThread):
        (KXMLCore::TCMalloc_ThreadCache::GetCache):
        (KXMLCore::TCMalloc_ThreadCache::GetCacheIfPresent):
        (KXMLCore::TCMalloc_ThreadCache::CreateCacheIfNecessary):
        (KXMLCore::do_malloc):
        (KXMLCore::do_free):
        (KXMLCore::realloc):
        * kxmlcore/FastMalloc.h:
        (operator new):
        (operator delete):
        (operator new[]):
        (operator delete[]):
        * kxmlcore/HashTable.cpp:
        * kxmlcore/TCSpinLock.h:
        (TCMalloc_SpinLock::Lock):
        (TCMalloc_SpinLock::Unlock):
        (TCMalloc_SlowLock):
        * kxmlcore/TCSystemAlloc.cpp:

WebCore:

        Reviewed by Darin.

<rdar://problem/4283967> REGRESSION: 3% regression on PLT from new FastMalloc
http://bugzilla.opendarwin.org/show_bug.cgi?id=5243

- use fastMalloc for everything - it now gets applied to all new/delete allocations
        via a private inline operator new that is now included into every file via config.h

        * WebCore.xcodeproj/project.pbxproj:
        * WebCorePrefix.h:
        * khtml/css/css_base.cpp:
        * khtml/css/css_base.h:
        * khtml/css/css_computedstyle.cpp:
        * khtml/css/css_ruleimpl.cpp:
        * khtml/css/css_stylesheetimpl.cpp:
        * khtml/css/css_valueimpl.cpp:
        * khtml/css/css_valueimpl.h:
        * khtml/css/csshelper.cpp:
        * khtml/css/cssparser.cpp:
        (ValueList::ValueList):
        (ValueList::~ValueList):
        (ValueList::addValue):
        (CSSParser::CSSParser):
        (CSSParser::~CSSParser):
        (CSSParser::setupParser):
        (CSSParser::addProperty):
        * khtml/css/cssstyleselector.cpp:
        * khtml/css/cssstyleselector.h:
        * khtml/dom/dom2_events.cpp:
        * khtml/dom/dom2_traversal.cpp:
        * khtml/dom/dom_misc.cpp:
        * khtml/dom/dom_string.cpp:
        * khtml/ecma/domparser.cpp:
        * khtml/ecma/kjs_binding.cpp:
        * khtml/ecma/kjs_css.cpp:
        * khtml/ecma/kjs_dom.cpp:
        * khtml/ecma/kjs_events.cpp:
        * khtml/ecma/kjs_html.cpp:
        (KJS::KJS::Context2DFunction::callAsFunction):
        (KJS::Gradient::~Gradient):
        (KJS::Gradient::addColorStop):
        (KJS::Gradient::colorStops):
        * khtml/ecma/kjs_navigator.cpp:
        * khtml/ecma/kjs_proxy.cpp:
        * khtml/ecma/kjs_range.cpp:
        * khtml/ecma/kjs_traversal.cpp:
        * khtml/ecma/kjs_views.cpp:
        * khtml/ecma/kjs_window.cpp:
        * khtml/ecma/xmlhttprequest.cpp:
        * khtml/ecma/xmlserializer.cpp:
        * khtml/editing/SelectionController.cpp:
        * khtml/editing/append_node_command.cpp:
        * khtml/editing/apply_style_command.cpp:
        * khtml/editing/break_blockquote_command.cpp:
        * khtml/editing/composite_edit_command.cpp:
        * khtml/editing/delete_from_text_node_command.cpp:
        * khtml/editing/delete_selection_command.cpp:
        * khtml/editing/edit_command.cpp:
        * khtml/editing/html_interchange.cpp:
        * khtml/editing/htmlediting.cpp:
        * khtml/editing/insert_into_text_node_command.cpp:
        * khtml/editing/insert_line_break_command.cpp:
        * khtml/editing/insert_node_before_command.cpp:
        * khtml/editing/insert_paragraph_separator_command.cpp:
        * khtml/editing/insert_text_command.cpp:
        * khtml/editing/join_text_nodes_command.cpp:
        * khtml/editing/jsediting.cpp:
        * khtml/editing/markup.cpp:
        * khtml/editing/merge_identical_elements_command.cpp:
        * khtml/editing/move_selection_command.cpp:
        * khtml/editing/rebalance_whitespace_command.cpp:
        * khtml/editing/remove_css_property_command.cpp:
        * khtml/editing/remove_node_attribute_command.cpp:
        * khtml/editing/remove_node_command.cpp:
        * khtml/editing/remove_node_preserving_children_command.cpp:
        * khtml/editing/replace_selection_command.cpp:
        * khtml/editing/set_node_attribute_command.cpp:
        * khtml/editing/split_element_command.cpp:
        * khtml/editing/split_text_node_command.cpp:
        * khtml/editing/split_text_node_containing_element.cpp:
        * khtml/editing/typing_command.cpp:
        * khtml/editing/visible_position.cpp:
        * khtml/editing/visible_range.cpp:
        * khtml/editing/visible_text.cpp:
        (khtml::CircularSearchBuffer::~CircularSearchBuffer):
        (khtml::CircularSearchBuffer::CircularSearchBuffer):
        * khtml/editing/visible_units.cpp:
        * khtml/editing/wrap_contents_in_dummy_span_command.cpp:
        * khtml/html/html_baseimpl.cpp:
        * khtml/html/html_blockimpl.cpp:
        * khtml/html/html_canvasimpl.cpp:
        * khtml/html/html_documentimpl.cpp:
        * khtml/html/html_elementimpl.cpp:
        * khtml/html/html_formimpl.cpp:
        * khtml/html/html_headimpl.cpp:
        * khtml/html/html_imageimpl.cpp:
        * khtml/html/html_inlineimpl.cpp:
        * khtml/html/html_listimpl.cpp:
        * khtml/html/html_miscimpl.cpp:
        * khtml/html/html_objectimpl.cpp:
        * khtml/html/html_tableimpl.cpp:
        * khtml/html/htmlfactory.cpp:
        * khtml/html/htmlnames.cpp:
        * khtml/html/htmlparser.cpp:
        * khtml/html/htmltokenizer.cpp:
        (khtml::HTMLTokenizer::enlargeBuffer):
        (khtml::HTMLTokenizer::enlargeScriptBuffer):
        * khtml/khtml_events.cpp:
        * khtml/khtml_part.cpp:
        * khtml/khtmlview.cpp:
        * khtml/misc/arena.cpp:
        * khtml/misc/arena.h:
        * khtml/misc/decoder.cpp:
        * khtml/misc/formdata.cpp:
        * khtml/misc/helper.cpp:
        * khtml/misc/loader.cpp:
        * khtml/misc/stringit.cpp:
        * khtml/rendering/bidi.cpp:
        * khtml/rendering/break_lines.cpp:
        * khtml/rendering/font.cpp:
        * khtml/rendering/render_arena.cpp:
        * khtml/rendering/render_block.cpp:
        * khtml/rendering/render_box.cpp:
        * khtml/rendering/render_br.cpp:
        * khtml/rendering/render_canvas.cpp:
        * khtml/rendering/render_canvasimage.cpp:
        (RenderCanvasImage::~RenderCanvasImage):
        (RenderCanvasImage::createDrawingContext):
        * khtml/rendering/render_container.cpp:
        * khtml/rendering/render_flexbox.cpp:
        * khtml/rendering/render_flow.cpp:
        * khtml/rendering/render_form.cpp:
        * khtml/rendering/render_frames.cpp:
        * khtml/rendering/render_image.cpp:
        * khtml/rendering/render_inline.cpp:
        * khtml/rendering/render_layer.cpp:
        * khtml/rendering/render_line.cpp:
        * khtml/rendering/render_list.cpp:
        * khtml/rendering/render_object.cpp:
        * khtml/rendering/render_replaced.cpp:
        * khtml/rendering/render_style.cpp:
        * khtml/rendering/render_style.h:
        * khtml/rendering/render_table.cpp:
        * khtml/rendering/render_text.cpp:
        * khtml/rendering/render_theme.cpp:
        * khtml/rendering/render_theme_mac.mm:
        * khtml/rendering/table_layout.cpp:
        * khtml/xbl/xbl_binding.cpp:
        * khtml/xbl/xbl_binding_manager.cpp:
        * khtml/xbl/xbl_docimpl.cpp:
        * khtml/xbl/xbl_protobinding.cpp:
        * khtml/xbl/xbl_protohandler.cpp:
        * khtml/xbl/xbl_protoimplementation.cpp:
        * khtml/xbl/xbl_tokenizer.cpp:
        * khtml/xml/EventNames.cpp:
        * khtml/xml/dom2_eventsimpl.cpp:
        * khtml/xml/dom2_eventsimpl.h:
        * khtml/xml/dom2_rangeimpl.cpp:
        * khtml/xml/dom2_rangeimpl.h:
        * khtml/xml/dom2_traversalimpl.cpp:
        * khtml/xml/dom2_traversalimpl.h:
        * khtml/xml/dom2_viewsimpl.cpp:
        * khtml/xml/dom2_viewsimpl.h:
        * khtml/xml/dom_atomicstring.cpp:
        * khtml/xml/dom_docimpl.cpp:
        * khtml/xml/dom_docimpl.h:
        * khtml/xml/dom_elementimpl.cpp:
        * khtml/xml/dom_elementimpl.h:
        * khtml/xml/dom_nodeimpl.cpp:
        * khtml/xml/dom_nodeimpl.h:
        * khtml/xml/dom_position.cpp:
        * khtml/xml/dom_qname.cpp:
        * khtml/xml/dom_stringimpl.cpp:
        * khtml/xml/dom_stringimpl.h:
        * khtml/xml/dom_textimpl.cpp:
        * khtml/xml/dom_xmlimpl.cpp:
        * khtml/xml/xml_tokenizer.cpp:
        * khtml/xsl/xsl_stylesheetimpl.cpp:
        * khtml/xsl/xslt_processorimpl.cpp:
        * kwq/DOM-CSS.mm:
        * kwq/DOM.mm:
        * kwq/DOMEvents.mm:
        * kwq/DOMHTML.mm:
        * kwq/DOMInternal.mm:
        (DOMString::DOMString):
        * kwq/DOMUtility.mm:
        * kwq/DOMViews.mm:
        * kwq/KWQAccObject.mm:
        * kwq/KWQAccObjectCache.mm:
        * kwq/KWQApplication.mm:
        * kwq/KWQArrayImpl.h:
        * kwq/KWQArrayImpl.mm:
        * kwq/KWQBuffer.mm:
        * kwq/KWQButton.mm:
        * kwq/KWQCString.mm:
        * kwq/KWQCharsets.mm:
        * kwq/KWQClipboard.mm:
        * kwq/KWQCollection.mm:
        * kwq/KWQColor.mm:
        * kwq/KWQComboBox.mm:
        * kwq/KWQCursor.mm:
        * kwq/KWQDateTime.mm:
        * kwq/KWQDictImpl.mm:
        * kwq/KWQEditCommand.mm:
        * kwq/KWQEvent.mm:
        * kwq/KWQExceptions.mm:
        * kwq/KWQFile.mm:
        * kwq/KWQFileButton.mm:
        * kwq/KWQFont.mm:
        * kwq/KWQFontFamily.h:
        * kwq/KWQFontFamily.mm:
        * kwq/KWQFontMetrics.mm:
        * kwq/KWQFormData.mm:
        * kwq/KWQFrame.mm:
        * kwq/KWQGlobal.mm:
        * kwq/KWQGuardedPtr.mm:
        * kwq/KWQKCharsets.mm:
        * kwq/KWQKConfigBase.mm:
        * kwq/KWQKCookieJar.mm:
        * kwq/KWQKCursor.mm:
        * kwq/KWQKGlobal.mm:
        * kwq/KWQKGlobalSettings.mm:
        * kwq/KWQKHTMLFactory.mm:
        * kwq/KWQKHTMLPart.cpp:
        * kwq/KWQKHTMLPart.mm:
        * kwq/KWQKHTMLPartBrowserExtension.mm:
        * kwq/KWQKHTMLView.mm:
        * kwq/KWQKHistoryProvider.mm:
        * kwq/KWQKJavaAppletWidget.mm:
        * kwq/KWQKJob.mm:
        * kwq/KWQKJobClasses.mm:
        * kwq/KWQKLocale.mm:
        * kwq/KWQKPartsBrowserInterface.mm:
        * kwq/KWQKPartsEvent.mm:
        * kwq/KWQKPartsPart.mm:
        * kwq/KWQKSSLKeyGen.mm:
        * kwq/KWQKStandardDirs.mm:
        * kwq/KWQKStringHandler.mm:
        * kwq/KWQKURL.mm:
        (KURL::KURL):
        (KURL::decode_string):
        (KURL::parse):
        (KURL::encode_string):
        (encodeRelativeString):
        * kwq/KWQKWin.mm:
        * kwq/KWQKWinModule.mm:
        * kwq/KWQLabel.mm:
        * kwq/KWQLineEdit.mm:
        * kwq/KWQListBox.mm:
        * kwq/KWQListImpl.mm:
        * kwq/KWQLoader.mm:
        (KWQIsResponseURLEqualToURL):
        * kwq/KWQMapImpl.h:
        * kwq/KWQMapImpl.mm:
        * kwq/KWQMovie.mm:
        * kwq/KWQObject.mm:
        * kwq/KWQPageState.mm:
        * kwq/KWQPaintDeviceMetrics.mm:
        * kwq/KWQPainter.mm:
        * kwq/KWQPalette.mm:
        * kwq/KWQPen.mm:
        * kwq/KWQPixmap.mm:
        * kwq/KWQPoint.mm:
        * kwq/KWQPointArray.mm:
        * kwq/KWQPtrDictImpl.mm:
        * kwq/KWQPushButton.mm:
        * kwq/KWQRect.mm:
        * kwq/KWQRegExp.mm:
        * kwq/KWQRegion.mm:
        * kwq/KWQRenderTreeDebug.cpp:
        * kwq/KWQResourceLoader.mm:
        * kwq/KWQScrollBar.mm:
        * kwq/KWQScrollView.mm:
        * kwq/KWQSignal.mm:
        * kwq/KWQSignalStubs.mm:
        * kwq/KWQSize.mm:
        * kwq/KWQSlider.mm:
        * kwq/KWQSlot.mm:
        * kwq/KWQString.h:
        * kwq/KWQString.mm:
        (ALLOC_CHAR):
        (REALLOC_CHAR):
        (DELETE_CHAR):
        (ALLOC_QCHAR):
        (REALLOC_QCHAR):
        (DELETE_QCHAR):
        (_printQStringAllocationStatistics):
        (allocateHandle):
        (KWQStringData::operator new):
        (KWQStringData::operator delete):
        (freeHandle):
        * kwq/KWQStringList.mm:
        * kwq/KWQStyle.mm:
        * kwq/KWQTextArea.mm:
        * kwq/KWQTextCodec.mm:
        * kwq/KWQTextEdit.mm:
        * kwq/KWQTextField.mm:
        * kwq/KWQTextStream.mm:
        * kwq/KWQTextUtilities.mm:
        * kwq/KWQTimer.mm:
        * kwq/KWQValueListImpl.h:
        * kwq/KWQValueListImpl.mm:
        * kwq/KWQVariant.mm:
        * kwq/KWQVectorImpl.mm:
        (KWQVectorImpl::KWQVectorImpl):
        (KWQVectorImpl::~KWQVectorImpl):
        (KWQVectorImpl::clear):
        (KWQVectorImpl::resize):
        (KWQVectorImpl::assign):
        * kwq/KWQWMatrix.mm:
        * kwq/KWQWidget.mm:
        * kwq/KWQWindowWidget.mm:
        * kwq/WebCoreBridge.mm:
        * kwq/WebCoreCache.mm:
        * kwq/WebCoreEncodings.mm:
        * kwq/WebCoreJavaScript.mm:
        * kwq/WebCoreScriptDebugger.mm:
        * kwq/WebCoreSettings.mm:
        * kwq/WebCoreTextRendererFactory.mm:
        * kwq/can-convert.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@10701 268f45cc-cd09-0410-ab3c-d52691b4dbfc

345 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
JavaScriptCore/JavaScriptCorePrefix.h
JavaScriptCore/bindings/NP_jsobject.cpp
JavaScriptCore/bindings/c/c_class.cpp
JavaScriptCore/bindings/c/c_instance.cpp
JavaScriptCore/bindings/c/c_runtime.cpp
JavaScriptCore/bindings/c/c_utility.cpp
JavaScriptCore/bindings/jni/jni_class.cpp
JavaScriptCore/bindings/jni/jni_instance.cpp
JavaScriptCore/bindings/jni/jni_jsobject.cpp
JavaScriptCore/bindings/jni/jni_objc.mm
JavaScriptCore/bindings/jni/jni_runtime.cpp
JavaScriptCore/bindings/jni/jni_utility.cpp
JavaScriptCore/bindings/npruntime.cpp
JavaScriptCore/bindings/objc/WebScriptObject.mm
JavaScriptCore/bindings/objc/objc_class.mm
JavaScriptCore/bindings/objc/objc_instance.mm
JavaScriptCore/bindings/objc/objc_runtime.mm
JavaScriptCore/bindings/objc/objc_utility.mm
JavaScriptCore/bindings/runtime.cpp
JavaScriptCore/bindings/runtime_array.cpp
JavaScriptCore/bindings/runtime_method.cpp
JavaScriptCore/bindings/runtime_object.cpp
JavaScriptCore/bindings/runtime_root.cpp
JavaScriptCore/bindings/testbindings.cpp
JavaScriptCore/bindings/testbindings.mm
JavaScriptCore/kjs/array_object.cpp
JavaScriptCore/kjs/bool_object.cpp
JavaScriptCore/kjs/collector.cpp
JavaScriptCore/kjs/config.h
JavaScriptCore/kjs/debugger.cpp
JavaScriptCore/kjs/error_object.cpp
JavaScriptCore/kjs/fpconst.cpp
JavaScriptCore/kjs/function.cpp
JavaScriptCore/kjs/function_object.cpp
JavaScriptCore/kjs/identifier.cpp
JavaScriptCore/kjs/internal.cpp
JavaScriptCore/kjs/interpreter.cpp
JavaScriptCore/kjs/lexer.cpp
JavaScriptCore/kjs/list.cpp
JavaScriptCore/kjs/lookup.cpp
JavaScriptCore/kjs/math_object.cpp
JavaScriptCore/kjs/nodes.cpp
JavaScriptCore/kjs/nodes.h
JavaScriptCore/kjs/nodes2string.cpp
JavaScriptCore/kjs/number_object.cpp
JavaScriptCore/kjs/object.cpp
JavaScriptCore/kjs/object_object.cpp
JavaScriptCore/kjs/operations.cpp
JavaScriptCore/kjs/property_map.cpp
JavaScriptCore/kjs/property_slot.cpp
JavaScriptCore/kjs/protected_values.cpp
JavaScriptCore/kjs/reference.cpp
JavaScriptCore/kjs/reference_list.cpp
JavaScriptCore/kjs/regexp.cpp
JavaScriptCore/kjs/regexp_object.cpp
JavaScriptCore/kjs/scope_chain.cpp
JavaScriptCore/kjs/scope_chain.h
JavaScriptCore/kjs/string_object.cpp
JavaScriptCore/kjs/testkjs.cpp
JavaScriptCore/kjs/ustring.h
JavaScriptCore/kjs/value.cpp
JavaScriptCore/kxmlcore/Assertions.mm
JavaScriptCore/kxmlcore/FastMalloc.cpp
JavaScriptCore/kxmlcore/FastMalloc.h
JavaScriptCore/kxmlcore/FastMallocInternal.h [new file with mode: 0644]
JavaScriptCore/kxmlcore/HashTable.cpp
JavaScriptCore/kxmlcore/TCSpinLock.h
JavaScriptCore/kxmlcore/TCSystemAlloc.cpp
WebCore/ChangeLog-2005-12-19
WebCore/ForwardingHeaders/config.h [deleted file]
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/WebCorePrefix.h
WebCore/khtml/css/css_base.cpp
WebCore/khtml/css/css_base.h
WebCore/khtml/css/css_computedstyle.cpp
WebCore/khtml/css/css_ruleimpl.cpp
WebCore/khtml/css/css_stylesheetimpl.cpp
WebCore/khtml/css/css_valueimpl.cpp
WebCore/khtml/css/css_valueimpl.h
WebCore/khtml/css/csshelper.cpp
WebCore/khtml/css/cssparser.cpp
WebCore/khtml/css/cssstyleselector.cpp
WebCore/khtml/css/cssstyleselector.h
WebCore/khtml/css/parser.y
WebCore/khtml/dom/dom2_events.cpp
WebCore/khtml/dom/dom2_traversal.cpp
WebCore/khtml/dom/dom_misc.cpp
WebCore/khtml/dom/dom_string.cpp
WebCore/khtml/ecma/domparser.cpp
WebCore/khtml/ecma/kjs_binding.cpp
WebCore/khtml/ecma/kjs_css.cpp
WebCore/khtml/ecma/kjs_dom.cpp
WebCore/khtml/ecma/kjs_events.cpp
WebCore/khtml/ecma/kjs_html.cpp
WebCore/khtml/ecma/kjs_navigator.cpp
WebCore/khtml/ecma/kjs_proxy.cpp
WebCore/khtml/ecma/kjs_range.cpp
WebCore/khtml/ecma/kjs_traversal.cpp
WebCore/khtml/ecma/kjs_views.cpp
WebCore/khtml/ecma/kjs_window.cpp
WebCore/khtml/ecma/xmlhttprequest.cpp
WebCore/khtml/ecma/xmlserializer.cpp
WebCore/khtml/editing/SelectionController.cpp
WebCore/khtml/editing/append_node_command.cpp
WebCore/khtml/editing/apply_style_command.cpp
WebCore/khtml/editing/break_blockquote_command.cpp
WebCore/khtml/editing/composite_edit_command.cpp
WebCore/khtml/editing/delete_from_text_node_command.cpp
WebCore/khtml/editing/delete_selection_command.cpp
WebCore/khtml/editing/edit_command.cpp
WebCore/khtml/editing/html_interchange.cpp
WebCore/khtml/editing/htmlediting.cpp
WebCore/khtml/editing/insert_into_text_node_command.cpp
WebCore/khtml/editing/insert_line_break_command.cpp
WebCore/khtml/editing/insert_node_before_command.cpp
WebCore/khtml/editing/insert_paragraph_separator_command.cpp
WebCore/khtml/editing/insert_text_command.cpp
WebCore/khtml/editing/join_text_nodes_command.cpp
WebCore/khtml/editing/jsediting.cpp
WebCore/khtml/editing/markup.cpp
WebCore/khtml/editing/merge_identical_elements_command.cpp
WebCore/khtml/editing/move_selection_command.cpp
WebCore/khtml/editing/rebalance_whitespace_command.cpp
WebCore/khtml/editing/remove_css_property_command.cpp
WebCore/khtml/editing/remove_node_attribute_command.cpp
WebCore/khtml/editing/remove_node_command.cpp
WebCore/khtml/editing/remove_node_preserving_children_command.cpp
WebCore/khtml/editing/replace_selection_command.cpp
WebCore/khtml/editing/set_node_attribute_command.cpp
WebCore/khtml/editing/split_element_command.cpp
WebCore/khtml/editing/split_text_node_command.cpp
WebCore/khtml/editing/split_text_node_containing_element.cpp
WebCore/khtml/editing/typing_command.cpp
WebCore/khtml/editing/visible_position.cpp
WebCore/khtml/editing/visible_range.cpp
WebCore/khtml/editing/visible_text.cpp
WebCore/khtml/editing/visible_units.cpp
WebCore/khtml/editing/wrap_contents_in_dummy_span_command.cpp
WebCore/khtml/html/html_baseimpl.cpp
WebCore/khtml/html/html_blockimpl.cpp
WebCore/khtml/html/html_canvasimpl.cpp
WebCore/khtml/html/html_documentimpl.cpp
WebCore/khtml/html/html_elementimpl.cpp
WebCore/khtml/html/html_formimpl.cpp
WebCore/khtml/html/html_headimpl.cpp
WebCore/khtml/html/html_imageimpl.cpp
WebCore/khtml/html/html_inlineimpl.cpp
WebCore/khtml/html/html_listimpl.cpp
WebCore/khtml/html/html_miscimpl.cpp
WebCore/khtml/html/html_objectimpl.cpp
WebCore/khtml/html/html_tableimpl.cpp
WebCore/khtml/html/htmlfactory.cpp
WebCore/khtml/html/htmlnames.cpp
WebCore/khtml/html/htmlparser.cpp
WebCore/khtml/html/htmltokenizer.cpp
WebCore/khtml/khtml_events.cpp
WebCore/khtml/khtml_part.cpp
WebCore/khtml/khtmlview.cpp
WebCore/khtml/misc/arena.cpp
WebCore/khtml/misc/arena.h
WebCore/khtml/misc/decoder.cpp
WebCore/khtml/misc/formdata.cpp
WebCore/khtml/misc/helper.cpp
WebCore/khtml/misc/loader.cpp
WebCore/khtml/misc/stringit.cpp
WebCore/khtml/rendering/bidi.cpp
WebCore/khtml/rendering/break_lines.cpp
WebCore/khtml/rendering/font.cpp
WebCore/khtml/rendering/render_arena.cpp
WebCore/khtml/rendering/render_block.cpp
WebCore/khtml/rendering/render_box.cpp
WebCore/khtml/rendering/render_br.cpp
WebCore/khtml/rendering/render_canvas.cpp
WebCore/khtml/rendering/render_canvasimage.cpp
WebCore/khtml/rendering/render_container.cpp
WebCore/khtml/rendering/render_flexbox.cpp
WebCore/khtml/rendering/render_flow.cpp
WebCore/khtml/rendering/render_form.cpp
WebCore/khtml/rendering/render_frames.cpp
WebCore/khtml/rendering/render_image.cpp
WebCore/khtml/rendering/render_inline.cpp
WebCore/khtml/rendering/render_layer.cpp
WebCore/khtml/rendering/render_line.cpp
WebCore/khtml/rendering/render_list.cpp
WebCore/khtml/rendering/render_object.cpp
WebCore/khtml/rendering/render_replaced.cpp
WebCore/khtml/rendering/render_style.cpp
WebCore/khtml/rendering/render_style.h
WebCore/khtml/rendering/render_table.cpp
WebCore/khtml/rendering/render_text.cpp
WebCore/khtml/rendering/render_theme.cpp
WebCore/khtml/rendering/render_theme_mac.mm
WebCore/khtml/rendering/table_layout.cpp
WebCore/khtml/xbl/xbl_binding.cpp
WebCore/khtml/xbl/xbl_binding_manager.cpp
WebCore/khtml/xbl/xbl_docimpl.cpp
WebCore/khtml/xbl/xbl_protobinding.cpp
WebCore/khtml/xbl/xbl_protohandler.cpp
WebCore/khtml/xbl/xbl_protoimplementation.cpp
WebCore/khtml/xbl/xbl_tokenizer.cpp
WebCore/khtml/xml/EventNames.cpp
WebCore/khtml/xml/dom2_eventsimpl.cpp
WebCore/khtml/xml/dom2_eventsimpl.h
WebCore/khtml/xml/dom2_rangeimpl.cpp
WebCore/khtml/xml/dom2_rangeimpl.h
WebCore/khtml/xml/dom2_traversalimpl.cpp
WebCore/khtml/xml/dom2_traversalimpl.h
WebCore/khtml/xml/dom2_viewsimpl.cpp
WebCore/khtml/xml/dom2_viewsimpl.h
WebCore/khtml/xml/dom_atomicstring.cpp
WebCore/khtml/xml/dom_docimpl.cpp
WebCore/khtml/xml/dom_docimpl.h
WebCore/khtml/xml/dom_elementimpl.cpp
WebCore/khtml/xml/dom_elementimpl.h
WebCore/khtml/xml/dom_nodeimpl.cpp
WebCore/khtml/xml/dom_nodeimpl.h
WebCore/khtml/xml/dom_position.cpp
WebCore/khtml/xml/dom_qname.cpp
WebCore/khtml/xml/dom_stringimpl.cpp
WebCore/khtml/xml/dom_stringimpl.h
WebCore/khtml/xml/dom_textimpl.cpp
WebCore/khtml/xml/dom_xmlimpl.cpp
WebCore/khtml/xml/xml_tokenizer.cpp
WebCore/khtml/xsl/xsl_stylesheetimpl.cpp
WebCore/khtml/xsl/xslt_processorimpl.cpp
WebCore/kwq/DOM-CSS.mm
WebCore/kwq/DOM.mm
WebCore/kwq/DOMEvents.mm
WebCore/kwq/DOMHTML.mm
WebCore/kwq/DOMInternal.mm
WebCore/kwq/DOMUtility.mm
WebCore/kwq/DOMViews.mm
WebCore/kwq/KWQAccObject.mm
WebCore/kwq/KWQAccObjectCache.mm
WebCore/kwq/KWQApplication.mm
WebCore/kwq/KWQArrayImpl.h
WebCore/kwq/KWQArrayImpl.mm
WebCore/kwq/KWQBuffer.mm
WebCore/kwq/KWQButton.mm
WebCore/kwq/KWQCString.mm
WebCore/kwq/KWQCharsets.mm
WebCore/kwq/KWQClipboard.mm
WebCore/kwq/KWQCollection.mm
WebCore/kwq/KWQColor.mm
WebCore/kwq/KWQComboBox.mm
WebCore/kwq/KWQCursor.mm
WebCore/kwq/KWQDateTime.mm
WebCore/kwq/KWQDictImpl.mm
WebCore/kwq/KWQEditCommand.mm
WebCore/kwq/KWQEvent.mm
WebCore/kwq/KWQExceptions.mm
WebCore/kwq/KWQFile.mm
WebCore/kwq/KWQFileButton.mm
WebCore/kwq/KWQFont.mm
WebCore/kwq/KWQFontFamily.h
WebCore/kwq/KWQFontFamily.mm
WebCore/kwq/KWQFontMetrics.mm
WebCore/kwq/KWQFormData.mm
WebCore/kwq/KWQFrame.mm
WebCore/kwq/KWQGlobal.mm
WebCore/kwq/KWQGuardedPtr.mm
WebCore/kwq/KWQKCharsets.mm
WebCore/kwq/KWQKConfigBase.mm
WebCore/kwq/KWQKCookieJar.mm
WebCore/kwq/KWQKCursor.mm
WebCore/kwq/KWQKGlobal.mm
WebCore/kwq/KWQKGlobalSettings.mm
WebCore/kwq/KWQKHTMLFactory.mm
WebCore/kwq/KWQKHTMLPart.cpp
WebCore/kwq/KWQKHTMLPart.mm
WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
WebCore/kwq/KWQKHTMLView.mm
WebCore/kwq/KWQKHistoryProvider.mm
WebCore/kwq/KWQKJavaAppletWidget.mm
WebCore/kwq/KWQKJob.mm
WebCore/kwq/KWQKJobClasses.mm
WebCore/kwq/KWQKLocale.mm
WebCore/kwq/KWQKPartsBrowserInterface.mm
WebCore/kwq/KWQKPartsEvent.mm
WebCore/kwq/KWQKPartsPart.mm
WebCore/kwq/KWQKSSLKeyGen.mm
WebCore/kwq/KWQKStandardDirs.mm
WebCore/kwq/KWQKStringHandler.mm
WebCore/kwq/KWQKURL.mm
WebCore/kwq/KWQKWin.mm
WebCore/kwq/KWQKWinModule.mm
WebCore/kwq/KWQLabel.mm
WebCore/kwq/KWQLineEdit.mm
WebCore/kwq/KWQListBox.mm
WebCore/kwq/KWQListImpl.mm
WebCore/kwq/KWQLoader.mm
WebCore/kwq/KWQMapImpl.h
WebCore/kwq/KWQMapImpl.mm
WebCore/kwq/KWQMovie.mm
WebCore/kwq/KWQObject.mm
WebCore/kwq/KWQPageState.mm
WebCore/kwq/KWQPaintDeviceMetrics.mm
WebCore/kwq/KWQPainter.mm
WebCore/kwq/KWQPalette.mm
WebCore/kwq/KWQPen.mm
WebCore/kwq/KWQPixmap.mm
WebCore/kwq/KWQPoint.mm
WebCore/kwq/KWQPointArray.mm
WebCore/kwq/KWQPtrDictImpl.mm
WebCore/kwq/KWQPushButton.mm
WebCore/kwq/KWQRect.mm
WebCore/kwq/KWQRegExp.mm
WebCore/kwq/KWQRegion.mm
WebCore/kwq/KWQRenderTreeDebug.cpp
WebCore/kwq/KWQResourceLoader.mm
WebCore/kwq/KWQScrollBar.mm
WebCore/kwq/KWQScrollView.mm
WebCore/kwq/KWQSignal.mm
WebCore/kwq/KWQSignalStubs.mm
WebCore/kwq/KWQSize.mm
WebCore/kwq/KWQSlider.mm
WebCore/kwq/KWQSlot.mm
WebCore/kwq/KWQString.h
WebCore/kwq/KWQString.mm
WebCore/kwq/KWQStringList.mm
WebCore/kwq/KWQStyle.mm
WebCore/kwq/KWQTextArea.mm
WebCore/kwq/KWQTextCodec.mm
WebCore/kwq/KWQTextEdit.mm
WebCore/kwq/KWQTextField.mm
WebCore/kwq/KWQTextStream.mm
WebCore/kwq/KWQTextUtilities.mm
WebCore/kwq/KWQTimer.mm
WebCore/kwq/KWQValueListImpl.h
WebCore/kwq/KWQValueListImpl.mm
WebCore/kwq/KWQVariant.mm
WebCore/kwq/KWQVectorImpl.mm
WebCore/kwq/KWQWMatrix.mm
WebCore/kwq/KWQWidget.mm
WebCore/kwq/KWQWindowWidget.mm
WebCore/kwq/WebCoreBridge.mm
WebCore/kwq/WebCoreCache.mm
WebCore/kwq/WebCoreEncodings.mm
WebCore/kwq/WebCoreJavaScript.mm
WebCore/kwq/WebCoreScriptDebugger.mm
WebCore/kwq/WebCoreSettings.mm
WebCore/kwq/WebCoreTextRendererFactory.mm
WebCore/kwq/can-convert.mm

index e7e6c0944b78d524e8fb4782759080e9bb908d61..0fc4dc753fe5fc176d038507a1575630df86ecd7 100644 (file)
@@ -1,3 +1,132 @@
+2005-10-02  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Darin.
+
+       <rdar://problem/4283967> REGRESSION: 3% regression on PLT from new FastMalloc
+       http://bugzilla.opendarwin.org/show_bug.cgi?id=5243
+       
+       A number of optimizations to the new threadsafe malloc that make it actually as fast
+       as dlmalloc (I measured wrong before) and as memory-efficient as the system malloc.
+
+       - use fastMalloc for everything - it now gets applied to all new/delete allocations
+       via a private inline operator new that is now included into every file via config.h.
+
+       - tweaked some of the numeric parameters for size classes and amount of wasted memory
+       allowed per allocation - this saves on memory use and consequently improves speed.
+
+       - so long as the allocator is not being used on background threads, get the per-thread
+       cache from a global variable instead of from pthread_getspecific, since the latter is slow.
+
+       - inline more functions, and force the ones GCC refuses to inline with 
+       attribute(always_inline), nearly all of these have one call site so inlining them has 
+       to be a win.
+
+       - use some tricks to calculate allocation size more efficiently and fewer times for small
+       allocations, to avoid hitting the huge size table array.
+
+       - avoid hitting the per-thread cache on code paths that don't need it.
+
+       - implement inline assembly version of spinlock for PowerPC (was already done for x86)
+
+        * bindings/NP_jsobject.cpp:
+        * bindings/c/c_class.cpp:
+        * bindings/c/c_instance.cpp:
+        * bindings/c/c_runtime.cpp:
+        * bindings/c/c_utility.cpp:
+        * bindings/jni/jni_class.cpp:
+        * bindings/jni/jni_instance.cpp:
+        * bindings/jni/jni_jsobject.cpp:
+        * bindings/jni/jni_objc.mm:
+        * bindings/jni/jni_runtime.cpp:
+        * bindings/jni/jni_utility.cpp:
+        * bindings/npruntime.cpp:
+        * bindings/objc/WebScriptObject.mm:
+        * bindings/objc/objc_class.mm:
+        * bindings/objc/objc_instance.mm:
+        * bindings/objc/objc_runtime.mm:
+        * bindings/objc/objc_utility.mm:
+        * bindings/runtime.cpp:
+        * bindings/runtime_array.cpp:
+        * bindings/runtime_method.cpp:
+        * bindings/runtime_object.cpp:
+        * bindings/runtime_root.cpp:
+        * bindings/testbindings.cpp:
+        * bindings/testbindings.mm:
+        * kjs/array_object.cpp:
+        (ArrayInstanceImp::ArrayInstanceImp):
+        (ArrayInstanceImp::~ArrayInstanceImp):
+        (ArrayInstanceImp::resizeStorage):
+        * kjs/bool_object.cpp:
+        * kjs/collector.cpp:
+        (KJS::Collector::registerThread):
+        * kjs/config.h:
+        * kjs/debugger.cpp:
+        * kjs/error_object.cpp:
+        * kjs/function.cpp:
+        * kjs/function_object.cpp:
+        * kjs/identifier.cpp:
+        (KJS::Identifier::rehash):
+        * kjs/internal.cpp:
+        (KJS::Parser::saveNewNode):
+        (KJS::clearNewNodes):
+        * kjs/interpreter.cpp:
+        * kjs/lexer.cpp:
+        (Lexer::doneParsing):
+        (Lexer::makeIdentifier):
+        (Lexer::makeUString):
+        * kjs/list.cpp:
+        * kjs/math_object.cpp:
+        * kjs/nodes.cpp:
+        * kjs/nodes.h:
+        * kjs/nodes2string.cpp:
+        * kjs/number_object.cpp:
+        (integer_part_noexp):
+        (char_sequence):
+        * kjs/object.cpp:
+        * kjs/object_object.cpp:
+        * kjs/property_map.cpp:
+        * kjs/property_slot.cpp:
+        * kjs/protected_values.cpp:
+        (KJS::ProtectedValues::rehash):
+        * kjs/reference.cpp:
+        * kjs/reference_list.cpp:
+        * kjs/regexp.cpp:
+        * kjs/regexp_object.cpp:
+        * kjs/scope_chain.cpp:
+        * kjs/scope_chain.h:
+        * kjs/string_object.cpp:
+        * kjs/testkjs.cpp:
+        * kjs/ustring.h:
+        * kjs/value.cpp:
+        * kxmlcore/Assertions.mm:
+        * kxmlcore/FastMalloc.cpp:
+        (KXMLCore::InitSizeClasses):
+        (KXMLCore::DLL_IsEmpty):
+        (KXMLCore::DLL_Prepend):
+        (KXMLCore::TCMalloc_Central_FreeList::Insert):
+        (KXMLCore::TCMalloc_Central_FreeList::Remove):
+        (KXMLCore::TCMalloc_Central_FreeList::Populate):
+        (KXMLCore::TCMalloc_ThreadCache::Allocate):
+        (KXMLCore::TCMalloc_ThreadCache::FetchFromCentralCache):
+        (KXMLCore::fastMallocRegisterThread):
+        (KXMLCore::TCMalloc_ThreadCache::GetCache):
+        (KXMLCore::TCMalloc_ThreadCache::GetCacheIfPresent):
+        (KXMLCore::TCMalloc_ThreadCache::CreateCacheIfNecessary):
+        (KXMLCore::do_malloc):
+        (KXMLCore::do_free):
+        (KXMLCore::realloc):
+        * kxmlcore/FastMalloc.h:
+        (operator new):
+        (operator delete):
+        (operator new[]):
+        (operator delete[]):
+        * kxmlcore/HashTable.cpp:
+        * kxmlcore/TCSpinLock.h:
+        (TCMalloc_SpinLock::Lock):
+        (TCMalloc_SpinLock::Unlock):
+        (TCMalloc_SlowLock):
+        * kxmlcore/TCSystemAlloc.cpp:
+
 2005-09-30  Geoffrey Garen  <ggaren@apple.com>
 
         - Second cut at fixing <rdar://problem/4275206> Denver Regression: Seed: 
index 586cbf5baa1f2351941e876f32e4deff5929f660..a320323ad912cf58114d79be1d3d76e2cb30ebbf 100644 (file)
@@ -44,6 +44,7 @@
                65621E6E089E859700760F35 /* property_slot.h in Headers */ = {isa = PBXBuildFile; fileRef = 65621E6C089E859700760F35 /* property_slot.h */; settings = {ATTRIBUTES = (Private, ); }; };
                65621E6F089E85D300760F35 /* property_slot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65621E6B089E859700760F35 /* property_slot.cpp */; };
                65621E70089E85D300760F35 /* property_slot.h in Headers */ = {isa = PBXBuildFile; fileRef = 65621E6C089E859700760F35 /* property_slot.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               65D7D19C08F10B5B0015ABD8 /* FastMallocInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 65D7D19B08F10B5B0015ABD8 /* FastMallocInternal.h */; };
                65DFC93008EA173A00F7300B /* HashFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = 65DFC92A08EA173A00F7300B /* HashFunctions.h */; settings = {ATTRIBUTES = (Private, ); }; };
                65DFC93108EA173A00F7300B /* HashMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 65DFC92B08EA173A00F7300B /* HashMap.h */; settings = {ATTRIBUTES = (Private, ); }; };
                65DFC93208EA173A00F7300B /* HashSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 65DFC92C08EA173A00F7300B /* HashSet.h */; settings = {ATTRIBUTES = (Private, ); }; };
                65621E6B089E859700760F35 /* property_slot.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = property_slot.cpp; sourceTree = "<group>"; };
                65621E6C089E859700760F35 /* property_slot.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = property_slot.h; sourceTree = "<group>"; };
                65C02FBB0637462A003E7EE6 /* protect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = protect.h; sourceTree = "<group>"; };
+               65D7D19B08F10B5B0015ABD8 /* FastMallocInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FastMallocInternal.h; sourceTree = "<group>"; };
                65DFC92A08EA173A00F7300B /* HashFunctions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HashFunctions.h; sourceTree = "<group>"; };
                65DFC92B08EA173A00F7300B /* HashMap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HashMap.h; sourceTree = "<group>"; };
                65DFC92C08EA173A00F7300B /* HashSet.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HashSet.h; sourceTree = "<group>"; };
                65162EF108E6A21C007556CD /* kxmlcore */ = {
                        isa = PBXGroup;
                        children = (
+                               65D7D19B08F10B5B0015ABD8 /* FastMallocInternal.h */,
                                6557E8F708EA5D4D0049CDFC /* HashMapPtrSpec.h */,
                                65DFC92A08EA173A00F7300B /* HashFunctions.h */,
                                65DFC92B08EA173A00F7300B /* HashMap.h */,
                                65DFC93408EA173A00F7300B /* HashTable.h in Headers */,
                                65DFC93508EA173A00F7300B /* HashTraits.h in Headers */,
                                6557E8F808EA5D4D0049CDFC /* HashMapPtrSpec.h in Headers */,
+                               65D7D19C08F10B5B0015ABD8 /* FastMallocInternal.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index df6f3c14890722b595ddc290ae73934a29e82ebe..8aa9016a273fbbb8fda1f5a942be9a572bd910a7 100644 (file)
@@ -4,8 +4,6 @@
 #define NULL ((void *)0)
 #endif
 
-#include <config.h>
-
 #include <assert.h>
 #include <ctype.h>
 #include <float.h>
@@ -42,4 +40,8 @@
 #include <list>
 #include <typeinfo>
 
+#ifdef __cplusplus
+#define new ("if you use new/delete make sure to include config.h at the top of the file"()) 
+#define delete ("if you use new/delete make sure to include config.h at the top of the file"()) 
+#endif
 #endif
index d502b092bcb261a1984e4d00071edc99e53ec803..f342f7344a49acd07ec3b21ce06684c028efd39b 100644 (file)
@@ -22,6 +22,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+#include "config.h"
 #include <NP_jsobject.h>
 
 #include <JavaScriptCore/npruntime.h>
index 32814f9ec8234453d0a503a04e7622410f1820d3..93180eb045b0340617455a4322a6d066f1832b15 100644 (file)
@@ -22,6 +22,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+#include "config.h"
 #include <c_class.h>
 #include <c_instance.h>
 #include <c_runtime.h>
index f0e5f1659eab44a2f3848310031803375ece007d..b6074c150e13430693f8d55fdcfce6dceb88e5fc 100644 (file)
@@ -22,6 +22,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+#include "config.h"
 #include <c_class.h>
 #include <c_instance.h>
 #include <c_runtime.h>
index 324a4eba7349929d22c44df1284c3e2d0114bdda..53e2eecadc3d837d6c4278e8a1ee187d58fd0d42 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include <JavaScriptCore/internal.h>
 
 #include <c_instance.h>
index a1b3a29b34041d446abb297d8a41cad26a6c463f..c3d15c131ff32a770c2066d7a104b1848e8af85b 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "c_utility.h"
 
 #include "c_instance.h" 
index c62b83ed9c4c4c8e1a29069ff8bc8921036c5c53..cbe37d783f5caf78c45660f7fa96f9f08d7b10cd 100644 (file)
@@ -22,6 +22,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+#include "config.h"
 #include <jni_class.h>
 
 #include <jni_utility.h>
index fcba6e7fc9197979dd957fdd6b1603b67e754ca8..38d4002e29017b18a1f10c4c0ae43cfcc0c6cd12 100644 (file)
@@ -22,6 +22,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+#include "config.h"
 #include <jni_class.h>
 #include <jni_instance.h>
 #include <jni_runtime.h>
index cdfa2f0ad06eec43d8d956b97875f76d03d7407b..e8ede8c5049a1c4b5de870236b8f2bc7e93663d0 100644 (file)
@@ -22,6 +22,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+#include "config.h"
 #include <CoreFoundation/CoreFoundation.h>
 
 #include <assert.h>
index d0d20c40068f0e338c4c94ce446f9e84b4835d11..b4f7ed25082d6ea388fd2f476a6e2595fb7cd7fb 100644 (file)
@@ -22,6 +22,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+#include "config.h"
 #import <Foundation/Foundation.h>
 #import <JavaScriptCore/jni_utility.h>
 #import <JavaScriptCore/objc_utility.h>
index 6bf6fc745505ea068d8b41e707405a76ffa40258..7806dc5789e5aaee8e9f09b269011cf51cda4a00 100644 (file)
@@ -22,6 +22,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+#include "config.h"
 #include <internal.h>
 #include <ustring.h>
 #include <value.h>
index 9b28e6fd25aabf6166b18707ce5f44d7c7fcde9f..e02aaf6b53ab10c7459c4923881e8047f4fa16dd 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "jni_utility.h"
 
 #include "interpreter.h"
index 4f9a8f7afb34e8665e6582e6c8af03dfa12757d0..0a7410f3c59c1ea5010ee8c6605d3a41917e12e2 100644 (file)
@@ -22,6 +22,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+#include "config.h"
 #include <CoreFoundation/CoreFoundation.h>
 
 #include <npruntime.h>
index 49dec2e2e084d3906ac91bbf789475cc88e78cf9..634c3fca81a327aab382161d380fb1646caa3710 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "WebScriptObjectPrivate.h"
 
 #import "internal.h"
index fc99741ecd3512a3774b0ce5de52dd335ba97e3c..b4a41491c1eb388d932a1eedb343266c02136b12 100644 (file)
@@ -22,6 +22,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+#include "config.h"
 #include <Foundation/Foundation.h>
 
 #include <objc_class.h>
index e47d804a57023c13b8e06b161e3ccfe1e328a677..e195a524abc1c366ddc5c8462a86a0dfcb430b5f 100644 (file)
@@ -22,6 +22,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+#include "config.h"
 #import <Foundation/Foundation.h>
 
 #import <JavaScriptCore/objc_instance.h>
index b59250260cdd5c3553afb07ed31c77241e1667b7..29e1028f18aeb0420e4e632ea5fb9d4cc3e380fd 100644 (file)
@@ -22,6 +22,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+#include "config.h"
 #include <Foundation/Foundation.h>
 
 
index cfe02532838b50634e01932c4c537c32a963d559..d31b068575512ad1d249944530c8ab950862d032 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "objc_utility.h"
 
 #include <Foundation/Foundation.h>
index 5f565ca0c1b068f3ab90acec22a1ef03cff6c20c..9c2b8fbf65764296e56d74c15eebc0436ce629fd 100644 (file)
@@ -22,6 +22,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+#include "config.h"
 #include <value.h>
 #include <interpreter.h>
 
index aa320e951e8b9600f9a6a40d1a33b17d8f43435c..e878a3c34356d69e42592513f4f8730ef2cde7cd 100644 (file)
@@ -22,6 +22,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+#include "config.h"
 #include <identifier.h>
 #include <interpreter.h>
 #include <runtime.h>
index 9fce9d476b20392fbd9ec0394c305ac2e0d8dca0..46dbcb39f73dfdb7c8fc09a7adf0e9de70abe8d0 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
  
+#include "config.h"
 #include "context.h"
 #include "internal.h"
 #include "runtime_method.h"
index 70eec0d8eb1bad07af3c298be30777bed98890e3..4da3405b6bc7b89a5352a397467c2c9ec5d93871 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "error_object.h"
 #include "function.h"
 #include "interpreter.h"
index 69cf0a638553650d67d4151d58da84b5aeac9634..7d068c58fd6c813072c4f3a403f8e37a0fbaaa91 100644 (file)
@@ -22,6 +22,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
+#include "config.h"
 #include <jni_jsobject.h>
 #include <runtime_root.h>
 
index fd5c449e1dfacaaee0686a322f6fb280508489fa..55bec315a1de70af096f6ff419b329c65892e0df 100644 (file)
@@ -19,6 +19,7 @@
  *  Boston, MA 02111-1307, USA.
  *
  */
+#include "config.h"
 #include <assert.h>
 #include <stdio.h>
 #include <string.h>
index bcf5c2e4657cdf7781a1d425e0642687a8de2006..994280ed2908eb5934554db9262865b5d8daabfb 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include <Foundation/Foundation.h>
 
 #import <WebKit/WebScriptObject.h>
index 280c47f8f009b3930d1daf3005eaba88879e0973..63717828f2fbf36fb255f0eec9e041c46c4c29d2 100644 (file)
@@ -20,6 +20,7 @@
  *
  */
 
+#include "config.h"
 #include "array_object.h"
 
 #include "error_object.h"
@@ -49,7 +50,7 @@ ArrayInstanceImp::ArrayInstanceImp(ObjectImp *proto, unsigned initialLength)
   , length(initialLength)
   , storageLength(initialLength < sparseArrayCutoff ? initialLength : 0)
   , capacity(storageLength)
-  , storage(capacity ? (ValueImp **)calloc(capacity, sizeof(ValueImp *)) : 0)
+  , storage(capacity ? (ValueImp **)fastCalloc(capacity, sizeof(ValueImp *)) : 0)
 {
 }
 
@@ -58,7 +59,7 @@ ArrayInstanceImp::ArrayInstanceImp(ObjectImp *proto, const List &list)
   , length(list.size())
   , storageLength(length)
   , capacity(storageLength)
-  , storage(capacity ? (ValueImp **)malloc(sizeof(ValueImp *) * capacity) : 0)
+  , storage(capacity ? (ValueImp **)fastMalloc(sizeof(ValueImp *) * capacity) : 0)
 {
   ListIterator it = list.begin();
   unsigned l = length;
@@ -69,7 +70,7 @@ ArrayInstanceImp::ArrayInstanceImp(ObjectImp *proto, const List &list)
 
 ArrayInstanceImp::~ArrayInstanceImp()
 {
-  free(storage);
+  fastFree(storage);
 }
 
 ValueImp *ArrayInstanceImp::lengthGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot& slot)
@@ -215,7 +216,7 @@ void ArrayInstanceImp::resizeStorage(unsigned newLength)
           newCapacity = sparseArrayCutoff;
         }
       }
-      storage = (ValueImp **)realloc(storage, newCapacity * sizeof (ValueImp *));
+      storage = (ValueImp **)fastRealloc(storage, newCapacity * sizeof (ValueImp *));
       memset(storage + capacity, 0, sizeof(ValueImp *) * (newCapacity - capacity));
       capacity = newCapacity;
     }
index f07583c2ad67aae214414db7c0d78bce0b318191..8e29b0e1408d2b888f4da29b13dcf366004e483d 100644 (file)
@@ -20,6 +20,7 @@
  *
  */
 
+#include "config.h"
 #include "value.h"
 #include "object.h"
 #include "types.h"
index 2e90a4155e6e8fa6be4e0059f6b86bbf745ad61e..f126ccc29eddb6216380caa50150a34686fc79da 100644 (file)
  *
  */
 
+#include "config.h"
 #include "collector.h"
 
 #include <kxmlcore/FastMalloc.h>
+#include <kxmlcore/FastMallocInternal.h>
 #include "internal.h"
 #include "list.h"
 #include "value.h"
@@ -224,6 +226,7 @@ void Collector::registerThread()
 
   if (!pthread_getspecific(registeredThreadKey)) {
     pthread_t pthread = pthread_self();
+    KXMLCore::fastMallocRegisterThread(pthread);
     Collector::Thread *thread = new Collector::Thread(pthread, pthread_mach_thread_np(pthread));
     thread->next = registeredThreads;
     registeredThreads = thread;
index 8501b4378552ace44b2ddec28d9c501ba24f22f1..42f28fb95c9a8fb46d9c9c771001e438f4c1d292 100644 (file)
@@ -32,3 +32,9 @@
 #undef DEBUG_COLLECTOR
 
 #define KXC_CHANGES 1
+
+#ifdef __cplusplus
+#undef new
+#undef delete
+#include <kxmlcore/FastMalloc.h>
+#endif
index 89e467ff00ba6399512a967971a80c4ef579c440..56d7fbd11e1eab9320309f3b94dd17ef8b83b003 100644 (file)
@@ -20,6 +20,7 @@
  *
  */
 
+#include "config.h"
 #include "debugger.h"
 #include "value.h"
 #include "object.h"
index 9ef1f1e70706463594922b10d2a9dd555b9b8b2e..96fc8951b6e77d2394d0c2e8d2e2c50445994ebf 100644 (file)
@@ -20,6 +20,7 @@
  *
  */
 
+#include "config.h"
 #include "value.h"
 #include "object.h"
 #include "types.h"
index ad5d29c55a7f946bc067bc57e069d8585d9d1868..d732f4534ee5bc3815daa281cfeae4c807db4ac5 100644 (file)
@@ -17,7 +17,7 @@
  *
  */
 
-#include <config.h>
+#include "config.h"
 
 // This file exists because JavaScriptCore needs to define the NaN and Inf globals in a way
 // that does not use a static initializer so we don't have a framework initialization routine.
index 41ea9e4fdc4fd1f4b7baf78759f017bbe00ddd51..4d0056130651cde6abf39e8ca7ed4a9a97ba74a7 100644 (file)
@@ -22,6 +22,7 @@
  *
  */
 
+#include "config.h"
 #include "function.h"
 
 #include "internal.h"
index 8d645c128eb62814ebb864183de0a2cc0c410e5c..ca27633550885d96e02c175b4a79196355318192 100644 (file)
@@ -20,6 +20,7 @@
  *
  */
 
+#include "config.h"
 #include "function_object.h"
 #include "internal.h"
 #include "function.h"
index 80b770fc5306b06c550b34327806e95f2e9c2760..c64a5d2532199af68336ece8a9208331dc1f96e0 100644 (file)
@@ -33,6 +33,7 @@
 #define KJS_IDENTIFIER_HIDE_GLOBALS 1
 #endif
 
+#include "config.h"
 #include "identifier.h"
 
 #include <kxmlcore/FastMalloc.h>
@@ -287,13 +288,13 @@ void Identifier::rehash(int newTableSize)
 
     _tableSize = newTableSize;
     _tableSizeMask = newTableSize - 1;
-    _table = (UString::Rep **)calloc(newTableSize, sizeof(UString::Rep *));
+    _table = (UString::Rep **)fastCalloc(newTableSize, sizeof(UString::Rep *));
 
     for (int i = 0; i != oldTableSize; ++i)
         if (UString::Rep *key = oldTable[i])
             insert(key);
 
-    free(oldTable);
+    fastFree(oldTable);
 }
 
 // Global constants for property name strings.
index 1036c3c4916d107cda6b764b9e3605e35318dbb1..9ae3d0135a7ee784a25804e96f8edb479cb7d0b6 100644 (file)
@@ -21,6 +21,7 @@
  *
  */
 
+#include "config.h"
 #include <stdio.h>
 #include <math.h>
 #include <assert.h>
@@ -367,7 +368,7 @@ void Parser::saveNewNode(Node *node)
 {
   if (numNewNodes == newNodesCapacity) {
     newNodesCapacity = (newNodesCapacity == 0) ? initialCapacity : newNodesCapacity * growthFactor;
-    newNodes = (Node **)realloc(newNodes, sizeof(Node *) * newNodesCapacity);
+    newNodes = (Node **)fastRealloc(newNodes, sizeof(Node *) * newNodesCapacity);
   }
 
   newNodes[numNewNodes++] = node;
@@ -379,7 +380,7 @@ static void clearNewNodes()
     if (newNodes[i]->refcount() == 0)
       delete newNodes[i];
   }
-  delete newNodes;
+  fastFree(newNodes);
   newNodes = 0;
   numNewNodes = 0;
   newNodesCapacity = 0;
index e91dc0b403fcac9f18713f60e8b6f3114b1948a0..067c06d76a14de1cd7a649fb8240e9ba3f59ad26 100644 (file)
@@ -22,6 +22,7 @@
  *
  */
 
+#include "config.h"
 #include "value.h"
 #include "object.h"
 #include "types.h"
index 8e879fca6366dee14ce6555e91fd025e0dfa8237..72324003427f3f18307bd49c5a4887de4e3c1c47 100644 (file)
@@ -834,7 +834,7 @@ void Lexer::doneParsing()
   for (unsigned i = 0; i < numIdentifiers; i++) {
     delete identifiers[i];
   }
-  free (identifiers);
+  fastFree(identifiers);
   identifiers = 0;
   numIdentifiers = 0;
   identifiersCapacity = 0;
@@ -842,7 +842,7 @@ void Lexer::doneParsing()
   for (unsigned i = 0; i < numStrings; i++) {
     delete strings[i];
   }
-  free (strings);
+  fastFree(strings);
   strings = 0;
   numStrings = 0;
   stringsCapacity = 0;
@@ -855,7 +855,7 @@ Identifier *Lexer::makeIdentifier(UChar *buffer, unsigned int pos)
 {
   if (numIdentifiers == identifiersCapacity) {
     identifiersCapacity = (identifiersCapacity == 0) ? initialCapacity : identifiersCapacity *growthFactor;
-    identifiers = (KJS::Identifier **)realloc(identifiers, sizeof(KJS::Identifier *) * identifiersCapacity);
+    identifiers = (KJS::Identifier **)fastRealloc(identifiers, sizeof(KJS::Identifier *) * identifiersCapacity);
   }
 
   KJS::Identifier *identifier = new KJS::Identifier(buffer16, pos16);
@@ -867,7 +867,7 @@ UString *Lexer::makeUString(UChar *buffer, unsigned int pos)
 {
   if (numStrings == stringsCapacity) {
     stringsCapacity = (stringsCapacity == 0) ? initialCapacity : stringsCapacity *growthFactor;
-    strings = (UString **)realloc(strings, sizeof(UString *) * stringsCapacity);
+    strings = (UString **)fastRealloc(strings, sizeof(UString *) * stringsCapacity);
   }
 
   UString *string = new UString(buffer16, pos16);
index ed15ab4c074fa4f2b62f2e687b1f1bef11ebb754..2124a03aa39d6e6cc9ee596da350e7c07e1684ad 100644 (file)
@@ -19,6 +19,7 @@
  *
  */
 
+#include "config.h"
 #include "list.h"
 
 #include "internal.h"
index 50f5ccb546595ed2184061974e36f468ba589174..c0856a43f41f556cadf9181be8730b21bea07bfd 100644 (file)
  *
  */
 
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
 
 #include "lookup.h"
 
 #ifdef HAVE_CONFIG_H
-#include <config.h>
 #endif
 
 using namespace KJS;
index 71ec1c3d3a83fa083d66db331ff9f3bdfe95dee9..afc5f54703ad08376c77715ae75e5b1fcf42fea7 100644 (file)
@@ -19,6 +19,7 @@
  *
  */
 
+#include "config.h"
 #include <math.h>
 #include <stdlib.h>
 #include <assert.h>
index 1d00bddced65b14e3c6db3f3d9d3519f84363c3e..e8be53050facaeeac8c89f649cae6a8a0df84868 100644 (file)
@@ -21,6 +21,7 @@
  *
  */
 
+#include "config.h"
 #include "nodes.h"
 
 #include <math.h>
index 0a928c771292946cc5b7f5dc364695ce1f08b2c7..fd60f8e7a4b312bea78aaae82fb9f2cda39f3834 100644 (file)
@@ -25,7 +25,6 @@
 #ifndef _NODES_H_
 #define _NODES_H_
 
-#include <kxmlcore/FastMalloc.h>
 #include <kxmlcore/SharedPtr.h>
 
 #include "internal.h"
@@ -71,7 +70,7 @@ namespace KJS {
                  OpInstanceOf
   };
 
-  class Node : public FastAllocated {
+  class Node {
   public:
     Node();
     virtual ~Node();
index d6d722e0ba32e2527f2c3bf6a803803b0e80e791..04ab896c7d831c83790646e4483c1cb36c4a37fc 100644 (file)
@@ -20,6 +20,7 @@
  *
  */
 
+#include "config.h"
 #include "nodes.h"
 
 namespace KJS {
index 5744edd036076d05da38dad4a0d4715b3835114a..f7164126e1b6a28b12df5f2567f44d2dd8b448c6 100644 (file)
@@ -19,6 +19,7 @@
  *
  */
 
+#include "config.h"
 #include "value.h"
 #include "object.h"
 #include "types.h"
@@ -96,17 +97,17 @@ static UString integer_part_noexp(double d)
         char *buf;
         
         if (length <= decimalPoint) {
-            buf = (char*)malloc(decimalPoint+1);
+            buf = (char*)fastMalloc(decimalPoint+1);
             strcpy(buf,result);
             memset(buf+length,'0',decimalPoint-length);
         } else {
-            buf = (char*)malloc(decimalPoint+1);
+            buf = (char*)fastMalloc(decimalPoint+1);
             strncpy(buf,result,decimalPoint);
         }
         
         buf[decimalPoint] = '\0';
         str += UString(buf);
-        free(buf);
+        fastFree(buf);
     }
     
     kjs_freedtoa(result);
@@ -116,11 +117,11 @@ static UString integer_part_noexp(double d)
 
 static UString char_sequence(char c, int count)
 {
-    char *buf = (char*)malloc(count+1);
+    char *buf = (char*)fastMalloc(count+1);
     memset(buf,c,count);
     buf[count] = '\0';
     UString s(buf);
-    free(buf);
+    fastFree(buf);
     return s;
 }
 
index 53ba0e0a0b8f98db4a922acb0d24bc44c446eec0..29907a25bc06da4bd4424e376cd24435b9a774fc 100644 (file)
@@ -22,6 +22,7 @@
  *
  */
 
+#include "config.h"
 #include "value.h"
 #include "object.h"
 #include "types.h"
index ad814605b5b1bcf7ed43c7f1b98e94c0f9ce8f14..f6a63dc8d94d5cb1ba730f612fd99ef815af5bb6 100644 (file)
@@ -19,6 +19,7 @@
  *
  */
 
+#include "config.h"
 #include "value.h"
 #include "object.h"
 #include "types.h"
index 60687d43b89401b9adf7f7192c958a1caf16db00..a34bfc79f16a1995e477a562b7cf60980e7e6c58 100644 (file)
@@ -20,9 +20,9 @@
  *
  */
 
+#include "config.h"
 #include "operations.h"
 
-#include "config.h"
 
 #include <stdio.h>
 #include <assert.h>
index a4ac8233152fa9a4e504e9fc8c5824b2e1422221..bcba9675abbcc90b71f38d5c36c06f95d63da217 100644 (file)
@@ -19,6 +19,7 @@
  *
  */
 
+#include "config.h"
 #include "property_map.h"
 
 #include <kxmlcore/FastMalloc.h>
index cb00478a46c2d9ece867c7df7557763e1419c099..4a7f4be4b753ba94692593d7ad08a894fee18429 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 
+#include "config.h"
 #include "property_slot.h"
 
 namespace KJS {
index bfc1d74f4e6bcac1c3bc77ece63e7a4dcfa614a0..de1dd96fefa0dbcdc9e823baa8f1d87fd9bb2e57 100644 (file)
@@ -20,6 +20,7 @@
  *
  */
 
+#include "config.h"
 #include "protected_values.h"
 
 #include "pointer_hash.h"
@@ -184,13 +185,13 @@ void ProtectedValues::rehash(int newTableSize)
 
     _tableSize = newTableSize;
     _tableSizeMask = newTableSize - 1;
-    _table = (KeyValue *)calloc(newTableSize, sizeof(KeyValue));
+    _table = (KeyValue *)fastCalloc(newTableSize, sizeof(KeyValue));
 
     for (int i = 0; i != oldTableSize; ++i)
         if (oldTable[i].key)
             insert(oldTable[i].key, oldTable[i].value);
 
-    free(oldTable);
+    fastFree(oldTable);
 }
 
 } // namespace
index 2c0a75d166173da7f212228cd323e0383e100313..bc750baa4f6774436106884201d5e3071352ac99 100644 (file)
@@ -20,7 +20,9 @@
  *
  */
 
+#include "config.h"
 #include "reference.h"
+
 #include "internal.h"
 
 namespace KJS {
index 94ff983388ff5319c05d98d3904a1643048a0f4a..5627c40538e6ebe8b6c546c912b5d86242e57388 100644 (file)
@@ -20,7 +20,9 @@
  *
  */
 
+#include "config.h"
 #include "reference_list.h"
+
 #include "protected_reference.h"
 
 namespace KJS {
index 0277e867dd776bb032285bbbf1f661d6523e22e0..d74e74abd06ebe9441d5d86451001fd511e6cfaa 100644 (file)
@@ -19,6 +19,7 @@
  *
  */
 
+#include "config.h"
 #include "regexp.h"
 
 #include <assert.h>
index dcb90bcacdfae42a3b5e8a7badd3da6a84db9d12..5b2228c3da45b575d9f44f04cb215844097addfd 100644 (file)
  *
  */
 
-#include <stdio.h>
+#include "config.h"
+#include "regexp_object.h"
 
+#include <stdio.h>
 #include "value.h"
 #include "object.h"
 #include "types.h"
@@ -29,7 +31,6 @@
 #include "operations.h"
 #include "internal.h"
 #include "regexp.h"
-#include "regexp_object.h"
 #include "error_object.h"
 
 using namespace KJS;
index ab1014bb69ca9dd2df6ed5ff0e74b50deea47510..5648dd1730288428621f4a99b12348c5c0f3ca81 100644 (file)
@@ -19,6 +19,7 @@
  *
  */
 
+#include "config.h"
 #include "scope_chain.h"
 
 #include "object.h"
index 1913d3ca567e322b4861d80a76e284fc54d568c1..57e70ea951033c22bb4bdd9cd1760b004b5e61fd 100644 (file)
 #ifndef KJS_SCOPE_CHAIN_H
 #define KJS_SCOPE_CHAIN_H
 
-#include <kxmlcore/FastMalloc.h>
-
 namespace KJS {
 
     class ObjectImp;
     
-    class ScopeChainNode : public FastAllocated {
+    class ScopeChainNode {
     public:
         ScopeChainNode(ScopeChainNode *n, ObjectImp *o)
             : next(n), object(o), refCount(1) { }
index 83081605ff332e744eb15433bd04405b23ee7354..87b340166de4d226f89a9a069556cc497f69a114 100644 (file)
@@ -20,6 +20,9 @@
  *
  */
 
+#include "config.h"
+#include "string_object.h"
+
 #include "value.h"
 #include "object.h"
 #include "types.h"
@@ -27,7 +30,6 @@
 #include "operations.h"
 #include "regexp.h"
 #include "regexp_object.h"
-#include "string_object.h"
 #include "error_object.h"
 #include <stdio.h>
 #include "string_object.lut.h"
index d9bd4496d183372cda00e7e359cb21eac5dc2380..d749f61793c53e868bc56f7c02e049f44f9908dc 100644 (file)
@@ -21,6 +21,7 @@
  *
  */
 
+#include "config.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 7320ee991888fc52df5e6a48aae7a93326a2a933..0ebd1893a14a3b784dd0d2bef7f678ab1fa9e98d 100644 (file)
@@ -193,7 +193,7 @@ namespace KJS {
   /**
    * @short Unicode string class
    */
-  class UString : public FastAllocated {
+  class UString {
     friend bool operator==(const UString&, const UString&);
     friend class UCharReference;
     friend class Identifier;
@@ -205,8 +205,6 @@ namespace KJS {
      */
     struct Rep {
 
-      FAST_ALLOCATED_POD;
-
       static Rep *create(UChar *d, int l);
       static Rep *createCopying(const UChar *d, int l);
       static Rep *create(Rep *base, int offset, int length);
index bbce2b22b503b7f5438144d04625fc268d586c57..b4fe895034e81741e3542e8055be9c61673b06f6 100644 (file)
@@ -21,6 +21,7 @@
  *
  */
 
+#include "config.h"
 #include "value.h"
 
 #include "object.h"
index 0165c513d4e82da1447cafa877449dcced0e478e..75d6062c98d97b4c6beb0aee4bee14077e74de31 100644 (file)
@@ -24,6 +24,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "Assertions.h"
 
 #define SUPPORT_OBJC_LOGGING 1
index 3c02cc14cbd6dc9948ecd3f83c2343f44ea357a8..126464629021797ebbdc061a797182cfb30d32c5 100644 (file)
@@ -62,6 +62,7 @@
 // * allocation of a reasonably complicated struct
 //   goes from about 1100 ns to about 300 ns.
 
+#include "config.h"
 #include "FastMalloc.h"
 
 #ifndef NDEBUG
@@ -98,7 +99,6 @@ void *fastRealloc(void* p, size_t n)
 
 #else
 
-#include "config.h"
 #include <new>
 #include <stdio.h>
 #include <stddef.h>
@@ -120,6 +120,12 @@ void *fastRealloc(void* p, size_t n)
 
 #include "Assertions.h"
 
+#ifdef __GNUC__
+#define ALWAYS_INLINE inline __attribute__((always_inline))
+#else
+#define ALWAYS_INLINE inline
+#endif
+
 #if KXC_CHANGES
 namespace KXMLCore {
 
@@ -154,6 +160,7 @@ static const size_t kMaxSize    = 8u * kPageSize;
 static const size_t kAlignShift = 3;
 static const size_t kAlignment  = 1 << kAlignShift;
 static const size_t kNumClasses = 170;
+static const size_t kMaxTinySize = 1 << 8;
 
 // Minimum number of pages to fetch from system at a time.  Must be
 // significantly bigger than kBlockSize to amortize system-call
@@ -285,11 +292,11 @@ static void InitSizeClasses() {
       // Increase alignment every so often.
       //
       // Since we double the alignment every time size doubles and
-      // size >= 128, this means that space wasted due to alignment is
-      // at most 16/128 i.e., 12.5%.  Plus we cap the alignment at 256
+      // size >= 256, this means that space wasted due to alignment is
+      // at most 16/256 i.e., 6.25%.  Plus we cap the alignment at 512
       // bytes, so the space wasted as a percentage starts falling for
-      // sizes > 2K.
-      if ((lg >= 7) && (alignshift < 8)) {
+      // sizes > 4K.
+      if ((lg >= 8) && (alignshift < 9)) {
         alignshift++;
       }
       size_base[lg] = next_class - ((size-1) >> alignshift);
@@ -309,11 +316,11 @@ static void InitSizeClasses() {
   // Initialize the number of pages we should allocate to split into
   // small objects for a given class.
   for (size_t cl = 1; cl < next_class; cl++) {
-    // Allocate enough pages so leftover is less than 1/8 of total.
-    // This bounds wasted space to at most 12.5%.
+    // Allocate enough pages so leftover is less than 1/16 of total.
+    // This bounds wasted space to at most 6.25%.
     size_t psize = kPageSize;
     const size_t s = class_to_size[cl];
-    while ((psize % s) > (psize >> 3)) {
+    while ((psize % s) > (psize >> 4)) {
       psize += kPageSize;
     }
     class_to_pages[cl] = psize >> kPageShift;
@@ -517,7 +524,7 @@ static inline void DLL_Remove(Span* span) {
   span->next = NULL;
 }
 
-static inline bool DLL_IsEmpty(const Span* list) {
+static ALWAYS_INLINE bool DLL_IsEmpty(const Span* list) {
   return list->next == list;
 }
 
@@ -541,7 +548,7 @@ static void DLL_Print(const char* label, const Span* list) {
 }
 #endif
 
-static void DLL_Prepend(Span* list, Span* span) {
+static inline void DLL_Prepend(Span* list, Span* span) {
   ASSERT(span->next == NULL);
   ASSERT(span->prev == NULL);
   span->next = list->next;
@@ -1017,7 +1024,7 @@ class TCMalloc_ThreadCache {
   void* Allocate(size_t size);
   void Deallocate(void* ptr, size_t size_class);
 
-  void FetchFromCentralCache(size_t cl);
+  void FetchFromCentralCache(size_t cl, size_t allocationSize);
   void ReleaseToCentralCache(size_t cl, int N);
   void Scavenge();
   void Print() const;
@@ -1135,7 +1142,7 @@ void TCMalloc_Central_FreeList::Init(size_t cl) {
   counter_ = 0;
 }
 
-inline void TCMalloc_Central_FreeList::Insert(void* object) {
+ALWAYS_INLINE void TCMalloc_Central_FreeList::Insert(void* object) {
   const PageID p = reinterpret_cast<uintptr_t>(object) >> kPageShift;
   Span* span = pageheap->GetDescriptor(p);
   ASSERT(span != NULL);
@@ -1180,7 +1187,7 @@ inline void TCMalloc_Central_FreeList::Insert(void* object) {
   }
 }
 
-inline void* TCMalloc_Central_FreeList::Remove() {
+ALWAYS_INLINE void* TCMalloc_Central_FreeList::Remove() {
   if (DLL_IsEmpty(&nonempty_)) return NULL;
   Span* span = nonempty_.next;
 
@@ -1199,7 +1206,7 @@ inline void* TCMalloc_Central_FreeList::Remove() {
 }
 
 // Fetch memory from the system and add to the central cache freelist.
-inline void TCMalloc_Central_FreeList::Populate() {
+ALWAYS_INLINE void TCMalloc_Central_FreeList::Populate() {
   // Release central list lock while operating on pageheap
   lock_.Unlock();
   const size_t npages = class_to_pages[size_class_];
@@ -1282,15 +1289,16 @@ void TCMalloc_ThreadCache::Cleanup() {
   }
 }
 
-inline void* TCMalloc_ThreadCache::Allocate(size_t size) {
+ALWAYS_INLINE void* TCMalloc_ThreadCache::Allocate(size_t size) {
   ASSERT(size <= kMaxSize);
   const size_t cl = SizeClass(size);
   FreeList* list = &list_[cl];
+  size_t allocationSize = (size <= kMaxTinySize) ? (size + 7) & ~0x7 : ByteSizeForClass(cl);
   if (list->empty()) {
-    FetchFromCentralCache(cl);
+    FetchFromCentralCache(cl, allocationSize);
     if (list->empty()) return NULL;
   }
-  size_ -= ByteSizeForClass(cl);
+  size_ -= allocationSize;
   return list->Pop();
 }
 
@@ -1306,7 +1314,7 @@ inline void TCMalloc_ThreadCache::Deallocate(void* ptr, size_t cl) {
 }
 
 // Remove some objects of class "cl" from central cache and add to thread heap
-inline void TCMalloc_ThreadCache::FetchFromCentralCache(size_t cl) {
+ALWAYS_INLINE void TCMalloc_ThreadCache::FetchFromCentralCache(size_t cl, size_t byteSize) {
   TCMalloc_Central_FreeList* src = &central_cache[cl];
   FreeList* dst = &list_[cl];
   SpinLockHolder h(&src->lock_);
@@ -1322,7 +1330,7 @@ inline void TCMalloc_ThreadCache::FetchFromCentralCache(size_t cl) {
       }
     }
     dst->Push(object);
-    size_ += ByteSizeForClass(cl);
+    size_ += byteSize;
   }
 }
 
@@ -1368,12 +1376,33 @@ inline void TCMalloc_ThreadCache::Scavenge() {
 #endif
 }
 
+bool isMultiThreaded;
+TCMalloc_ThreadCache *mainThreadCache;
+pthread_t mainThreadID;
+static SpinLock multiThreadedLock = SPINLOCK_INITIALIZER;
+
+void fastMallocRegisterThread(pthread_t thread) 
+{
+    if (thread != mainThreadID) {
+        // We lock when writing isMultiThreaded but not when reading it.
+        // It's ok if the main thread temporarily gets it wrong - the global
+        // variable cache is the same as the thread-specific cache for the main thread.
+        // And other threads can't get it wrong because they must have gone through 
+        // this function before allocating so they've synchronized.
+        SpinLockHolder lock(&multiThreadedLock);
+        isMultiThreaded = true;
+    }
+}
+
 inline TCMalloc_ThreadCache* TCMalloc_ThreadCache::GetCache() {
   void* ptr = NULL;
   if (!tsd_inited) {
     InitModule();
   } else {
-    ptr = pthread_getspecific(heap_key);
+      if (!isMultiThreaded)
+          ptr = mainThreadCache;
+      else
+          ptr = pthread_getspecific(heap_key);
   }
   if (ptr == NULL) ptr = CreateCacheIfNecessary();
   return reinterpret_cast<TCMalloc_ThreadCache*>(ptr);
@@ -1383,6 +1412,8 @@ inline TCMalloc_ThreadCache* TCMalloc_ThreadCache::GetCache() {
 // because we may be in the thread destruction code and may have
 // already cleaned up the cache for this thread.
 inline TCMalloc_ThreadCache* TCMalloc_ThreadCache::GetCacheIfPresent() {
+  if (!isMultiThreaded)
+      return mainThreadCache;
   if (!tsd_inited) return NULL;
   return reinterpret_cast<TCMalloc_ThreadCache*>
     (pthread_getspecific(heap_key));
@@ -1473,7 +1504,11 @@ void* TCMalloc_ThreadCache::CreateCacheIfNecessary() {
       if (thread_heaps != NULL) thread_heaps->prev_ = heap;
       thread_heaps = heap;
       thread_heap_count++;
-      RecomputeThreadCacheSize();
+      RecomputeThreadCacheSize(); 
+      if (!isMultiThreaded) {
+          mainThreadCache = heap;
+          mainThreadID = pthread_self();
+      }
     }
   }
 
@@ -1801,41 +1836,49 @@ static Span* DoSampledAllocation(size_t size) {
 }
 #endif
 
-static inline void* do_malloc(size_t size) {
+static ALWAYS_INLINE void* do_malloc(size_t size) {
 
 #ifndef KXC_CHANGES
   if (TCMallocDebug::level >= TCMallocDebug::kVerbose) 
     MESSAGE("In tcmalloc do_malloc(%" PRIuS")\n", size);
 #endif
 
+#ifndef KXC_CHANGES
   // The following call forces module initialization
   TCMalloc_ThreadCache* heap = TCMalloc_ThreadCache::GetCache();
-#ifndef KXC_CHANGES
   if (heap->SampleAllocation(size)) {
     Span* span = DoSampledAllocation(size);
     if (span == NULL) return NULL;
     return reinterpret_cast<void*>(span->start << kPageShift);
   } else
 #endif
-      if (size > kMaxSize) {
+  if (size > kMaxSize) {
     // Use page-level allocator
+    if (!tsd_inited && !phinited)
+      TCMalloc_ThreadCache::InitModule();
+
     SpinLockHolder h(&pageheap_lock);
+
+
     Span* span = pageheap->New(pages(size));
     if (span == NULL) return NULL;
     return reinterpret_cast<void*>(span->start << kPageShift);
   } else {
-    return heap->Allocate(size);
+#ifdef KXC_CHANGES
+      TCMalloc_ThreadCache* heap = TCMalloc_ThreadCache::GetCache();
+#endif
+      return heap->Allocate(size);
   }
 }
 
-static inline void do_free(void* ptr) {
+static ALWAYS_INLINE void do_free(void* ptr) {
 #ifndef KXC_CHANGES
   if (TCMallocDebug::level >= TCMallocDebug::kVerbose) 
     MESSAGE("In tcmalloc do_free(%p)\n", ptr);
 #endif
 #if KXC_CHANGES
-  if (ptr == NULL) return; 
-#else
+  if (ptr == NULL) return;
+#else KXC_CHANGES
   if (ptr == NULL || tcmalloc_is_destroyed) return;
 #endif
 
@@ -2071,7 +2114,7 @@ void* realloc(void* old_ptr, size_t new_size) {
 #ifndef KXC_CHANGES
     MallocHook::InvokeDeleteHook(old_ptr);
 #endif
-    do_free(old_ptr);
+    free(old_ptr);
     return NULL;
   }
 
@@ -2100,7 +2143,7 @@ void* realloc(void* old_ptr, size_t new_size) {
 #ifndef KXC_CHANGES
     MallocHook::InvokeDeleteHook(old_ptr);
 #endif
-    do_free(old_ptr);
+    free(old_ptr);
     return new_ptr;
   } else {
     return old_ptr;
index aa339f0c7f8cc93aeca726d27e2d1776969a5274..57fed4258f9210762ef7c4b015127a25275ee346 100644 (file)
@@ -32,27 +32,23 @@ namespace KXMLCore {
     void fastFree(void* p);
     void *fastRealloc(void* p, size_t n);
     
-    struct FastAllocated {
-        void* operator new(size_t s) { return fastMalloc(s); }
-        void operator delete(void* p) { fastFree(p); }
-        void* operator new[](size_t s) { return fastMalloc(s); }
-        void operator delete[](void* p) { fastFree(p); }
-    };
-    
-    // POD types can't have a base class, so they have to use a macro to
-    // add the appropriate operators
-    #define FAST_ALLOCATED_POD \
-        void* operator new(size_t s) { return fastMalloc(s); } \
-        void operator delete(void* p) { fastFree(p); } \
-        void* operator new[](size_t s) { return fastMalloc(s); } \
-        void operator delete[](void* p) { fastFree(p); } \
-
 } // namespace KXMLCore
 
 using KXMLCore::fastMalloc;
 using KXMLCore::fastCalloc;
 using KXMLCore::fastRealloc;
 using KXMLCore::fastFree;
-using KXMLCore::FastAllocated;
+
+#if __GNUC__
+#define KXMLCORE_PRIVATE_INLINE __private_extern__ inline __attribute__((always_inline))
+#else
+#define KXMLCORE_PRIVATE_INLINE inline
+#endif
+
+KXMLCORE_PRIVATE_INLINE void* operator new(size_t s) { return fastMalloc(s); }
+KXMLCORE_PRIVATE_INLINE void operator delete(void* p) { fastFree(p); }
+KXMLCORE_PRIVATE_INLINE void* operator new[](size_t s) { return fastMalloc(s); }
+KXMLCORE_PRIVATE_INLINE void operator delete[](void* p) { fastFree(p); }
+
 
 #endif /* KXMLCORE_FAST_MALLOC_H */
diff --git a/JavaScriptCore/kxmlcore/FastMallocInternal.h b/JavaScriptCore/kxmlcore/FastMallocInternal.h
new file mode 100644 (file)
index 0000000..00ecd1f
--- /dev/null
@@ -0,0 +1,32 @@
+// -*- mode: c++; c-basic-offset: 4 -*-
+/*
+ *  This file is part of the KDE libraries
+ *  Copyright (C) 2005 Apple Computer, Inc.
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public License
+ *  along with this library; see the file COPYING.LIB.  If not, write to
+ *  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ *  Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef KXMLCORE_FAST_MALLOC_INTERNAL_H
+#define KXMLCORE_FAST_MALLOC_INTERNAL_H
+
+#include <pthread.h>
+
+namespace KXMLCore {
+    void fastMallocRegisterThread(pthread_t thread);
+}
+
+#endif //  KXMLCORE_FAST_MALLOC_INTERNAL_H
index b9712e6195834d3c2c1e8290dd24286621cbcf10..c3f6c85a6be587676d11c4348b460ab0b499c2f5 100644 (file)
@@ -19,6 +19,7 @@
     Boston, MA 02111-1307, USA.
 */
 
+#include "config.h"
 #include "hashtable.h"
 
 namespace KXMLCore {
index 6c4ba1a1efa8b66e2847e99b5c9d2b1af86a5f73..2222c9935a2b7a82a29c8678256b2fff8fccaaf2 100644 (file)
 #endif
 #include <stdlib.h>    /* for abort() */
 
-// FIXME: it would be nice to port the fast version to PowerPC but right now it is not
-// showing up on the profile
-#if defined __i386__ && defined __GNUC__
-
+#if (defined __i386__ || defined __ppc__) && defined __GNUC__
 static void TCMalloc_SlowLock(volatile unsigned int* lockword);
 
 // The following is a struct so that it can be initialized at compile time
@@ -60,20 +57,42 @@ struct TCMalloc_SpinLock {
     
   inline void Lock() {
     int r;
+#if  __i386__
     __asm__ __volatile__
       ("xchgl %0, %1"
        : "=r"(r), "=m"(private_lockword_)
        : "0"(1), "m"(private_lockword_)
        : "memory");
+#else
+    volatile unsigned int *lockword_ptr = &private_lockword_;
+    __asm__ __volatile__
+        ("1: lwarx %0, 0, %1\n\t"
+         "stwcx. %2, 0, %1\n\t"
+         "bne- 1b\n\t"
+         "isync"
+         : "=&r" (r), "=r" (lockword_ptr)
+         : "r" (1), "1" (lockword_ptr)
+         : "memory");
+#endif
     if (r) TCMalloc_SlowLock(&private_lockword_);
   }
 
   inline void Unlock() {
+#if  __i386__
     __asm__ __volatile__
       ("movl $0, %0"
        : "=m"(private_lockword_)
        : "m" (private_lockword_)
        : "memory");
+#else
+    __asm__ __volatile__
+      ("isync\n\t"
+       "eieio\n\t"
+       "stw %1, %0"
+       : "=o" (private_lockword_) 
+       : "r" (0)
+       : "memory");
+#endif
   }
 };
 
@@ -83,11 +102,24 @@ static void TCMalloc_SlowLock(volatile unsigned int* lockword) {
   sched_yield();        // Yield immediately since fast path failed
   while (true) {
     int r;
+#if __i386__
     __asm__ __volatile__
       ("xchgl %0, %1"
        : "=r"(r), "=m"(*lockword)
        : "0"(1), "m"(*lockword)
        : "memory");
+
+#else
+    int tmp = 1;
+    __asm__ __volatile__
+        ("1: lwarx %0, 0, %1\n\t"
+         "stwcx. %2, 0, %1\n\t"
+         "bne- 1b\n\t"
+         "isync"
+         : "=&r" (r), "=r" (lockword)
+         : "r" (tmp), "1" (lockword)
+         : "memory");
+#endif
     if (!r) {
       return;
     }
index dfe52febaa08734f40d922843e468d0b266afdb3..506dd95008b030d7476a0af0c8fe5986bd6a0531 100644 (file)
@@ -66,8 +66,8 @@ static size_t pagesize = 0;
 // For 2.2 kernels, it looks like the sbrk address space (500MBish) and
 // the mmap address space (1300MBish) are disjoint, so we need both allocators
 // to get as much virtual memory as possible.
-static bool use_devmem = true;
-static bool use_sbrk = true;
+static bool use_devmem = false;
+static bool use_sbrk = false;
 static bool use_mmap = true;
 
 // Flags to keep us from retrying allocators that failed.
index 50af3be7466926b1621e9da508461d651c3fcb3e..6820173132c8980b8bf9bf93ad50767417236da5 100644 (file)
@@ -1,3 +1,326 @@
+2005-09-28  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Darin.
+
+       <rdar://problem/4283967> REGRESSION: 3% regression on PLT from new FastMalloc
+       http://bugzilla.opendarwin.org/show_bug.cgi?id=5243
+        
+       - use fastMalloc for everything - it now gets applied to all new/delete allocations
+        via a private inline operator new that is now included into every file via config.h
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * WebCorePrefix.h:
+        * khtml/css/css_base.cpp:
+        * khtml/css/css_base.h:
+        * khtml/css/css_computedstyle.cpp:
+        * khtml/css/css_ruleimpl.cpp:
+        * khtml/css/css_stylesheetimpl.cpp:
+        * khtml/css/css_valueimpl.cpp:
+        * khtml/css/css_valueimpl.h:
+        * khtml/css/csshelper.cpp:
+        * khtml/css/cssparser.cpp:
+        (ValueList::ValueList):
+        (ValueList::~ValueList):
+        (ValueList::addValue):
+        (CSSParser::CSSParser):
+        (CSSParser::~CSSParser):
+        (CSSParser::setupParser):
+        (CSSParser::addProperty):
+        * khtml/css/cssstyleselector.cpp:
+        * khtml/css/cssstyleselector.h:
+        * khtml/dom/dom2_events.cpp:
+        * khtml/dom/dom2_traversal.cpp:
+        * khtml/dom/dom_misc.cpp:
+        * khtml/dom/dom_string.cpp:
+        * khtml/ecma/domparser.cpp:
+        * khtml/ecma/kjs_binding.cpp:
+        * khtml/ecma/kjs_css.cpp:
+        * khtml/ecma/kjs_dom.cpp:
+        * khtml/ecma/kjs_events.cpp:
+        * khtml/ecma/kjs_html.cpp:
+        (KJS::KJS::Context2DFunction::callAsFunction):
+        (KJS::Gradient::~Gradient):
+        (KJS::Gradient::addColorStop):
+        (KJS::Gradient::colorStops):
+        * khtml/ecma/kjs_navigator.cpp:
+        * khtml/ecma/kjs_proxy.cpp:
+        * khtml/ecma/kjs_range.cpp:
+        * khtml/ecma/kjs_traversal.cpp:
+        * khtml/ecma/kjs_views.cpp:
+        * khtml/ecma/kjs_window.cpp:
+        * khtml/ecma/xmlhttprequest.cpp:
+        * khtml/ecma/xmlserializer.cpp:
+        * khtml/editing/SelectionController.cpp:
+        * khtml/editing/append_node_command.cpp:
+        * khtml/editing/apply_style_command.cpp:
+        * khtml/editing/break_blockquote_command.cpp:
+        * khtml/editing/composite_edit_command.cpp:
+        * khtml/editing/delete_from_text_node_command.cpp:
+        * khtml/editing/delete_selection_command.cpp:
+        * khtml/editing/edit_command.cpp:
+        * khtml/editing/html_interchange.cpp:
+        * khtml/editing/htmlediting.cpp:
+        * khtml/editing/insert_into_text_node_command.cpp:
+        * khtml/editing/insert_line_break_command.cpp:
+        * khtml/editing/insert_node_before_command.cpp:
+        * khtml/editing/insert_paragraph_separator_command.cpp:
+        * khtml/editing/insert_text_command.cpp:
+        * khtml/editing/join_text_nodes_command.cpp:
+        * khtml/editing/jsediting.cpp:
+        * khtml/editing/markup.cpp:
+        * khtml/editing/merge_identical_elements_command.cpp:
+        * khtml/editing/move_selection_command.cpp:
+        * khtml/editing/rebalance_whitespace_command.cpp:
+        * khtml/editing/remove_css_property_command.cpp:
+        * khtml/editing/remove_node_attribute_command.cpp:
+        * khtml/editing/remove_node_command.cpp:
+        * khtml/editing/remove_node_preserving_children_command.cpp:
+        * khtml/editing/replace_selection_command.cpp:
+        * khtml/editing/set_node_attribute_command.cpp:
+        * khtml/editing/split_element_command.cpp:
+        * khtml/editing/split_text_node_command.cpp:
+        * khtml/editing/split_text_node_containing_element.cpp:
+        * khtml/editing/typing_command.cpp:
+        * khtml/editing/visible_position.cpp:
+        * khtml/editing/visible_range.cpp:
+        * khtml/editing/visible_text.cpp:
+        (khtml::CircularSearchBuffer::~CircularSearchBuffer):
+        (khtml::CircularSearchBuffer::CircularSearchBuffer):
+        * khtml/editing/visible_units.cpp:
+        * khtml/editing/wrap_contents_in_dummy_span_command.cpp:
+        * khtml/html/html_baseimpl.cpp:
+        * khtml/html/html_blockimpl.cpp:
+        * khtml/html/html_canvasimpl.cpp:
+        * khtml/html/html_documentimpl.cpp:
+        * khtml/html/html_elementimpl.cpp:
+        * khtml/html/html_formimpl.cpp:
+        * khtml/html/html_headimpl.cpp:
+        * khtml/html/html_imageimpl.cpp:
+        * khtml/html/html_inlineimpl.cpp:
+        * khtml/html/html_listimpl.cpp:
+        * khtml/html/html_miscimpl.cpp:
+        * khtml/html/html_objectimpl.cpp:
+        * khtml/html/html_tableimpl.cpp:
+        * khtml/html/htmlfactory.cpp:
+        * khtml/html/htmlnames.cpp:
+        * khtml/html/htmlparser.cpp:
+        * khtml/html/htmltokenizer.cpp:
+        (khtml::HTMLTokenizer::enlargeBuffer):
+        (khtml::HTMLTokenizer::enlargeScriptBuffer):
+        * khtml/khtml_events.cpp:
+        * khtml/khtml_part.cpp:
+        * khtml/khtmlview.cpp:
+        * khtml/misc/arena.cpp:
+        * khtml/misc/arena.h:
+        * khtml/misc/decoder.cpp:
+        * khtml/misc/formdata.cpp:
+        * khtml/misc/helper.cpp:
+        * khtml/misc/loader.cpp:
+        * khtml/misc/stringit.cpp:
+        * khtml/rendering/bidi.cpp:
+        * khtml/rendering/break_lines.cpp:
+        * khtml/rendering/font.cpp:
+        * khtml/rendering/render_arena.cpp:
+        * khtml/rendering/render_block.cpp:
+        * khtml/rendering/render_box.cpp:
+        * khtml/rendering/render_br.cpp:
+        * khtml/rendering/render_canvas.cpp:
+        * khtml/rendering/render_canvasimage.cpp:
+        (RenderCanvasImage::~RenderCanvasImage):
+        (RenderCanvasImage::createDrawingContext):
+        * khtml/rendering/render_container.cpp:
+        * khtml/rendering/render_flexbox.cpp:
+        * khtml/rendering/render_flow.cpp:
+        * khtml/rendering/render_form.cpp:
+        * khtml/rendering/render_frames.cpp:
+        * khtml/rendering/render_image.cpp:
+        * khtml/rendering/render_inline.cpp:
+        * khtml/rendering/render_layer.cpp:
+        * khtml/rendering/render_line.cpp:
+        * khtml/rendering/render_list.cpp:
+        * khtml/rendering/render_object.cpp:
+        * khtml/rendering/render_replaced.cpp:
+        * khtml/rendering/render_style.cpp:
+        * khtml/rendering/render_style.h:
+        * khtml/rendering/render_table.cpp:
+        * khtml/rendering/render_text.cpp:
+        * khtml/rendering/render_theme.cpp:
+        * khtml/rendering/render_theme_mac.mm:
+        * khtml/rendering/table_layout.cpp:
+        * khtml/xbl/xbl_binding.cpp:
+        * khtml/xbl/xbl_binding_manager.cpp:
+        * khtml/xbl/xbl_docimpl.cpp:
+        * khtml/xbl/xbl_protobinding.cpp:
+        * khtml/xbl/xbl_protohandler.cpp:
+        * khtml/xbl/xbl_protoimplementation.cpp:
+        * khtml/xbl/xbl_tokenizer.cpp:
+        * khtml/xml/EventNames.cpp:
+        * khtml/xml/dom2_eventsimpl.cpp:
+        * khtml/xml/dom2_eventsimpl.h:
+        * khtml/xml/dom2_rangeimpl.cpp:
+        * khtml/xml/dom2_rangeimpl.h:
+        * khtml/xml/dom2_traversalimpl.cpp:
+        * khtml/xml/dom2_traversalimpl.h:
+        * khtml/xml/dom2_viewsimpl.cpp:
+        * khtml/xml/dom2_viewsimpl.h:
+        * khtml/xml/dom_atomicstring.cpp:
+        * khtml/xml/dom_docimpl.cpp:
+        * khtml/xml/dom_docimpl.h:
+        * khtml/xml/dom_elementimpl.cpp:
+        * khtml/xml/dom_elementimpl.h:
+        * khtml/xml/dom_nodeimpl.cpp:
+        * khtml/xml/dom_nodeimpl.h:
+        * khtml/xml/dom_position.cpp:
+        * khtml/xml/dom_qname.cpp:
+        * khtml/xml/dom_stringimpl.cpp:
+        * khtml/xml/dom_stringimpl.h:
+        * khtml/xml/dom_textimpl.cpp:
+        * khtml/xml/dom_xmlimpl.cpp:
+        * khtml/xml/xml_tokenizer.cpp:
+        * khtml/xsl/xsl_stylesheetimpl.cpp:
+        * khtml/xsl/xslt_processorimpl.cpp:
+        * kwq/DOM-CSS.mm:
+        * kwq/DOM.mm:
+        * kwq/DOMEvents.mm:
+        * kwq/DOMHTML.mm:
+        * kwq/DOMInternal.mm:
+        (DOMString::DOMString):
+        * kwq/DOMUtility.mm:
+        * kwq/DOMViews.mm:
+        * kwq/KWQAccObject.mm:
+        * kwq/KWQAccObjectCache.mm:
+        * kwq/KWQApplication.mm:
+        * kwq/KWQArrayImpl.h:
+        * kwq/KWQArrayImpl.mm:
+        * kwq/KWQBuffer.mm:
+        * kwq/KWQButton.mm:
+        * kwq/KWQCString.mm:
+        * kwq/KWQCharsets.mm:
+        * kwq/KWQClipboard.mm:
+        * kwq/KWQCollection.mm:
+        * kwq/KWQColor.mm:
+        * kwq/KWQComboBox.mm:
+        * kwq/KWQCursor.mm:
+        * kwq/KWQDateTime.mm:
+        * kwq/KWQDictImpl.mm:
+        * kwq/KWQEditCommand.mm:
+        * kwq/KWQEvent.mm:
+        * kwq/KWQExceptions.mm:
+        * kwq/KWQFile.mm:
+        * kwq/KWQFileButton.mm:
+        * kwq/KWQFont.mm:
+        * kwq/KWQFontFamily.h:
+        * kwq/KWQFontFamily.mm:
+        * kwq/KWQFontMetrics.mm:
+        * kwq/KWQFormData.mm:
+        * kwq/KWQFrame.mm:
+        * kwq/KWQGlobal.mm:
+        * kwq/KWQGuardedPtr.mm:
+        * kwq/KWQKCharsets.mm:
+        * kwq/KWQKConfigBase.mm:
+        * kwq/KWQKCookieJar.mm:
+        * kwq/KWQKCursor.mm:
+        * kwq/KWQKGlobal.mm:
+        * kwq/KWQKGlobalSettings.mm:
+        * kwq/KWQKHTMLFactory.mm:
+        * kwq/KWQKHTMLPart.cpp:
+        * kwq/KWQKHTMLPart.mm:
+        * kwq/KWQKHTMLPartBrowserExtension.mm:
+        * kwq/KWQKHTMLView.mm:
+        * kwq/KWQKHistoryProvider.mm:
+        * kwq/KWQKJavaAppletWidget.mm:
+        * kwq/KWQKJob.mm:
+        * kwq/KWQKJobClasses.mm:
+        * kwq/KWQKLocale.mm:
+        * kwq/KWQKPartsBrowserInterface.mm:
+        * kwq/KWQKPartsEvent.mm:
+        * kwq/KWQKPartsPart.mm:
+        * kwq/KWQKSSLKeyGen.mm:
+        * kwq/KWQKStandardDirs.mm:
+        * kwq/KWQKStringHandler.mm:
+        * kwq/KWQKURL.mm:
+        (KURL::KURL):
+        (KURL::decode_string):
+        (KURL::parse):
+        (KURL::encode_string):
+        (encodeRelativeString):
+        * kwq/KWQKWin.mm:
+        * kwq/KWQKWinModule.mm:
+        * kwq/KWQLabel.mm:
+        * kwq/KWQLineEdit.mm:
+        * kwq/KWQListBox.mm:
+        * kwq/KWQListImpl.mm:
+        * kwq/KWQLoader.mm:
+        (KWQIsResponseURLEqualToURL):
+        * kwq/KWQMapImpl.h:
+        * kwq/KWQMapImpl.mm:
+        * kwq/KWQMovie.mm:
+        * kwq/KWQObject.mm:
+        * kwq/KWQPageState.mm:
+        * kwq/KWQPaintDeviceMetrics.mm:
+        * kwq/KWQPainter.mm:
+        * kwq/KWQPalette.mm:
+        * kwq/KWQPen.mm:
+        * kwq/KWQPixmap.mm:
+        * kwq/KWQPoint.mm:
+        * kwq/KWQPointArray.mm:
+        * kwq/KWQPtrDictImpl.mm:
+        * kwq/KWQPushButton.mm:
+        * kwq/KWQRect.mm:
+        * kwq/KWQRegExp.mm:
+        * kwq/KWQRegion.mm:
+        * kwq/KWQRenderTreeDebug.cpp:
+        * kwq/KWQResourceLoader.mm:
+        * kwq/KWQScrollBar.mm:
+        * kwq/KWQScrollView.mm:
+        * kwq/KWQSignal.mm:
+        * kwq/KWQSignalStubs.mm:
+        * kwq/KWQSize.mm:
+        * kwq/KWQSlider.mm:
+        * kwq/KWQSlot.mm:
+        * kwq/KWQString.h:
+        * kwq/KWQString.mm:
+        (ALLOC_CHAR):
+        (REALLOC_CHAR):
+        (DELETE_CHAR):
+        (ALLOC_QCHAR):
+        (REALLOC_QCHAR):
+        (DELETE_QCHAR):
+        (_printQStringAllocationStatistics):
+        (allocateHandle):
+        (KWQStringData::operator new):
+        (KWQStringData::operator delete):
+        (freeHandle):
+        * kwq/KWQStringList.mm:
+        * kwq/KWQStyle.mm:
+        * kwq/KWQTextArea.mm:
+        * kwq/KWQTextCodec.mm:
+        * kwq/KWQTextEdit.mm:
+        * kwq/KWQTextField.mm:
+        * kwq/KWQTextStream.mm:
+        * kwq/KWQTextUtilities.mm:
+        * kwq/KWQTimer.mm:
+        * kwq/KWQValueListImpl.h:
+        * kwq/KWQValueListImpl.mm:
+        * kwq/KWQVariant.mm:
+        * kwq/KWQVectorImpl.mm:
+        (KWQVectorImpl::KWQVectorImpl):
+        (KWQVectorImpl::~KWQVectorImpl):
+        (KWQVectorImpl::clear):
+        (KWQVectorImpl::resize):
+        (KWQVectorImpl::assign):
+        * kwq/KWQWMatrix.mm:
+        * kwq/KWQWidget.mm:
+        * kwq/KWQWindowWidget.mm:
+        * kwq/WebCoreBridge.mm:
+        * kwq/WebCoreCache.mm:
+        * kwq/WebCoreEncodings.mm:
+        * kwq/WebCoreJavaScript.mm:
+        * kwq/WebCoreScriptDebugger.mm:
+        * kwq/WebCoreSettings.mm:
+        * kwq/WebCoreTextRendererFactory.mm:
+        * kwq/can-convert.mm:
+
 2005-10-03  Beth Dakin  <bdakin@apple.com>
 
         Reviewed by Darin.
diff --git a/WebCore/ForwardingHeaders/config.h b/WebCore/ForwardingHeaders/config.h
deleted file mode 100644 (file)
index e69de29..0000000
index 6604966cf11e0efd76ff4d9eb1a7983bf9550467..82327b64260d08deea476f79d9c7e25f7e62febe 100644 (file)
@@ -65,6 +65,8 @@
                65AC79A20831ED6D009385CE /* append_node_command.h in Headers */ = {isa = PBXBuildFile; fileRef = 65AC79A00831ED6D009385CE /* append_node_command.h */; };
                65AC79A90831F006009385CE /* apply_style_command.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65AC79A70831F006009385CE /* apply_style_command.cpp */; };
                65AC79AA0831F006009385CE /* apply_style_command.h in Headers */ = {isa = PBXBuildFile; fileRef = 65AC79A80831F006009385CE /* apply_style_command.h */; };
+               65C97AF308EA908800ACD273 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 65C97AF208EA908800ACD273 /* config.h */; };
+               65C97AF408EA908800ACD273 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 65C97AF208EA908800ACD273 /* config.h */; };
                65DC16C40831DD6F0022744E /* composite_edit_command.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65DC16C20831DD6F0022744E /* composite_edit_command.cpp */; };
                65DC16C50831DD6F0022744E /* composite_edit_command.h in Headers */ = {isa = PBXBuildFile; fileRef = 65DC16C30831DD6F0022744E /* composite_edit_command.h */; };
                7E6FEED80898582300C44C3F /* WebCoreScriptDebugger.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E6FEED60898582300C44C3F /* WebCoreScriptDebugger.h */; settings = {ATTRIBUTES = (Private, ); }; };
                65AC79A00831ED6D009385CE /* append_node_command.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = append_node_command.h; path = editing/append_node_command.h; sourceTree = "<group>"; };
                65AC79A70831F006009385CE /* apply_style_command.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = apply_style_command.cpp; path = editing/apply_style_command.cpp; sourceTree = "<group>"; };
                65AC79A80831F006009385CE /* apply_style_command.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = apply_style_command.h; path = editing/apply_style_command.h; sourceTree = "<group>"; };
+               65C97AF208EA908800ACD273 /* config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
                65DC16C20831DD6F0022744E /* composite_edit_command.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = composite_edit_command.cpp; path = editing/composite_edit_command.cpp; sourceTree = "<group>"; };
                65DC16C30831DD6F0022744E /* composite_edit_command.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = composite_edit_command.h; path = editing/composite_edit_command.h; sourceTree = "<group>"; };
                65F80697054D9F86008BF776 /* KWQExceptions.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = KWQExceptions.mm; sourceTree = "<group>"; };
                                BC41978B059293BE0016347F /* xbl */,
                                F523D32402DE4478018635CA /* xml */,
                                BC06F24406D18A35004A6FA3 /* xsl */,
+                               65C97AF208EA908800ACD273 /* config.h */,
                                F523D15202DE42AD018635CA /* khtml_events.h */,
                                F523D15102DE42AD018635CA /* khtml_events.cpp */,
                                F523D15402DE42AD018635CA /* khtml_part.h */,
                                BC1798DA088DA4F8006068A5 /* render_theme_mac.h in Headers */,
                                7E6FEED80898582300C44C3F /* WebCoreScriptDebugger.h in Headers */,
                                939885C408B7E3D100E707C4 /* EventNames.h in Headers */,
+                               65C97AF308EA908800ACD273 /* config.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                A8EA434708E14EAC004BC396 /* render_kcanvaswrapper.h in Headers */,
                                A8EA434908E14EAC004BC396 /* dom_kdomnodetreewrapper.h in Headers */,
                                A8EA434B08E14EAC004BC396 /* dom_kdomdocumentwrapper.h in Headers */,
+                               65C97AF408EA908800ACD273 /* config.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 63a0b65086882c3045121c755a447c70ecb4c14d..0bfc9d11783a37a7d9822d73e4812ebf97671b06 100644 (file)
@@ -67,3 +67,8 @@
 #import <Cocoa/Cocoa.h>
 
 #endif
+
+#ifdef __cplusplus
+#define new ("if you use new/delete make sure to include config.h at the top of the file"()) 
+#define delete ("if you use new/delete make sure to include config.h at the top of the file"()) 
+#endif
index 88787d507982c1ec54c58df1df42d158be2e2287..e8f410ec6fdb357d946ca118ba829adad9abf979 100644 (file)
@@ -25,6 +25,7 @@
 
 //#define CSS_DEBUG
 
+#include "config.h"
 #include "kdebug.h"
 
 #include "css_base.h"
index 6d89231cb1c869acf4b722c8d4a6492604d4e71c..fa8a3ee59a9f27941b417ea6bbf1996ca4fdf454 100644 (file)
@@ -46,7 +46,7 @@ namespace DOM {
 
     class DocumentImpl;
 
-    struct CSSNamespace : public FastAllocated {
+    struct CSSNamespace {
         AtomicString m_prefix;
         AtomicString m_uri;
         CSSNamespace* m_parent;
@@ -68,7 +68,7 @@ namespace DOM {
     };
     
 // this class represents a selector for a StyleRule
-    class CSSSelector : public FastAllocated
+    class CSSSelector
     {
     public:
         CSSSelector()
@@ -194,7 +194,7 @@ namespace DOM {
     };
 
     // a style class which has a parent (almost all have)
-    class StyleBaseImpl : public khtml::TreeShared<StyleBaseImpl>, public FastAllocated
+    class StyleBaseImpl : public khtml::TreeShared<StyleBaseImpl>
     {
     public:
        StyleBaseImpl()  { m_parent = 0; strictParsing = true; multiLength = false; }
index a050ecdc709d21dface3a5e3037da1826c4a6e2a..234880b8375551fe02e52f835d0ec922b0562218 100644 (file)
@@ -20,6 +20,7 @@
  * 02111-1307  USA
  */
 
+#include "config.h"
 #include "css_computedstyle.h"
 
 #include "cssproperties.h"
index 55d56df28b5d858e231c365b312e4fdb127a8bb8..4d3efc9bb7931e27b0fb3d53f5995104863ddc3f 100644 (file)
@@ -20,6 +20,7 @@
  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  */
+#include "config.h"
 #include "dom/css_rule.h"
 #include "dom/css_stylesheet.h"
 #include "dom/dom_exception.h"
index 7afba32e1874de365808d1599a08b152bfe95151..89bc63f0ff0d4bd542d2a853fd7fd1e619bbccdd 100644 (file)
@@ -24,6 +24,7 @@
 
 //#define CSS_STYLESHEET_DEBUG
 
+#include "config.h"
 #include "dom/dom_string.h"
 #include "dom/dom_exception.h"
 #include "dom/css_stylesheet.h"
index b67bb700d905cae43c876bc1876b222dda138589..cbd9b5f75b9b6b7744fb9885a4f0dab59990b258 100644 (file)
@@ -20,6 +20,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
 #include "css/css_valueimpl.h"
 
 #include "dom/css_value.h"
index 2acb76669a85dde75dfde866860a37b89f826c3e..f281bac2f2c053b34422f99b3985e8ec4c54bd2a 100644 (file)
@@ -238,7 +238,7 @@ public:
     virtual bool isQuirkValue() { return true; }
 };
 
-class CounterImpl : public khtml::Shared<CounterImpl>, public FastAllocated {
+class CounterImpl : public khtml::Shared<CounterImpl> {
 public:
     DOMString identifier() const { return m_identifier; }
     DOMString listStyle() const { return m_listStyle; }
@@ -249,7 +249,7 @@ public:
     DOMString m_separator;
 };
 
-class RectImpl : public khtml::Shared<RectImpl>, public FastAllocated {
+class RectImpl : public khtml::Shared<RectImpl> {
 public:
     RectImpl();
     virtual ~RectImpl();
@@ -274,7 +274,7 @@ protected:
 // and border-spacing (all of which are space-separated sets of two values).  At the moment we are only using it for
 // border-radius, but (FIXME) border-spacing and background-position could be converted over to use it
 // (eliminating some extra -khtml- internal properties).
-class PairImpl : public khtml::Shared<PairImpl>, public FastAllocated {
+class PairImpl : public khtml::Shared<PairImpl> {
 public:
     PairImpl();
     virtual ~PairImpl();
@@ -410,7 +410,7 @@ public:
 // ------------------------------------------------------------------------------
 
 // another helper class
-class CSSProperty : public FastAllocated
+class CSSProperty
 {
 public:
     CSSProperty() : m_id(-1), m_bImportant(false), m_value(0)
index c0adbdd3a738e3989aa29b4464bd8ac9360ba785..2e98f9899f80bfee7f27e91de6547ddd430ee48c 100644 (file)
@@ -19,6 +19,7 @@
  * Boston, MA 02111-1307, USA.
  *
  */
+#include "config.h"
 #include "csshelper.h"
 
 #include <qfontmetrics.h>
index 360d57cf81adf6c7250b59a7b2f0da0c573715f2..1e66a241454401a325df0785cc29906a847605bf 100644 (file)
@@ -24,6 +24,7 @@
 // #define TOKEN_DEBUG
 #define YYDEBUG 0
 
+#include "config.h"
 #include <kdebug.h>
 #include <kurl.h>
 
@@ -36,6 +37,7 @@
 #include "misc/helper.h"
 #include "xml/dom_docimpl.h"
 #include "csshelper.h"
+
 using namespace DOM;
 
 #include <stdlib.h>
@@ -46,7 +48,7 @@ void qFatal ( const char * msg ) {}
 
 ValueList::ValueList()
 {
-    values = (Value *) malloc( 16 * sizeof ( Value ) );
+    values = (Value *)fastMalloc(16 * sizeof(Value));
     numValues = 0;
     currentValue = 0;
     maxValues = 16;
@@ -61,14 +63,14 @@ ValueList::~ValueList()
        if ( values[i].unit == Value::Function )
            delete values[i].function;
     }
-    free( values );
+    fastFree(values);
 }
 
-void ValueList::addValue( const Value &val )
+void ValueList::addValue(const Value &val)
 {
-    if ( numValues >= maxValues ) {
+    if (numValues >= maxValues) {
        maxValues += 16;
-       values = (Value *) realloc( values, maxValues*sizeof( Value ) );
+       values = (Value *)fastRealloc(values, maxValues*sizeof(Value));
     }
     values[numValues++] = val;
 }
@@ -91,7 +93,7 @@ CSSParser::CSSParser( bool strictParsing )
 #endif
     strict = strictParsing;
 
-    parsedProperties = (CSSProperty **) malloc( 32 * sizeof( CSSProperty * ) );
+    parsedProperties = (CSSProperty **)fastMalloc(32 * sizeof(CSSProperty *));
     numParsedProperties = 0;
     maxParsedProperties = 32;
 
@@ -116,7 +118,7 @@ CSSParser::~CSSParser()
 {
     if ( numParsedProperties )
        clearProperties();
-    free( parsedProperties );
+    fastFree(parsedProperties);
 
     delete valueList;
 
@@ -124,7 +126,7 @@ CSSParser::~CSSParser()
     kdDebug( 6080 ) << "CSSParser::~CSSParser this=" << this << endl;
 #endif
 
-    free( data );
+    fastFree(data);
 
 }
 
@@ -138,7 +140,7 @@ void CSSParser::setupParser(const char *prefix, const DOMString &string, const c
 {
     int length = string.length() + strlen(prefix) + strlen(suffix) + 2;
     
-    data = (unsigned short *)malloc( length *sizeof( unsigned short ) );
+    data = (unsigned short *)fastMalloc( length *sizeof( unsigned short ) );
     for ( unsigned int i = 0; i < strlen(prefix); i++ )
        data[i] = prefix[i];
     
@@ -319,8 +321,8 @@ void CSSParser::addProperty( int propId, CSSValueImpl *value, bool important )
 
     if ( numParsedProperties >= maxParsedProperties ) {
        maxParsedProperties += 32;
-       parsedProperties = (CSSProperty **) realloc( parsedProperties,
-                                                   maxParsedProperties*sizeof( CSSProperty * ) );
+       parsedProperties = (CSSProperty **)fastRealloc(parsedProperties,
+                                                       maxParsedProperties*sizeof(CSSProperty *));
     }
     parsedProperties[numParsedProperties++] = prop;
 }
index 13d60569c031c05d48925536f7bb2fdf5cbf64d5..8aac6c36d360539d58eec75ea19464c8721b9d49 100644 (file)
@@ -20,6 +20,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
 #include "css/cssstyleselector.h"
 #include "rendering/render_style.h"
 #include "css/css_stylesheetimpl.h"
@@ -180,7 +181,7 @@ if (id == propID) \
 
 namespace khtml {
 
-class CSSRuleSet : public FastAllocated
+class CSSRuleSet
 {
 public:
     CSSRuleSet();
index 3680a11dc7db5ebc5adbb5f5efe318bd14066eed..7d6bda679e86be3c7bd2e3d54d2b67086a2d782c 100644 (file)
@@ -29,7 +29,6 @@
 #include "dom/dom_string.h"
 #include "xml/dom_stringimpl.h"
 #include "css/css_ruleimpl.h"
-#include <kxmlcore/FastMalloc.h>
 
 class KHTMLSettings;
 class KHTMLView;
@@ -62,7 +61,7 @@ namespace khtml
      * for specific implementations of the Selector. At the moment only CSSStyleSelector
      * exists, but someone may wish to implement XSL...
      */
-    class StyleSelector : public FastAllocated
+    class StyleSelector
     {
     public:
        StyleSelector() {};
@@ -224,7 +223,7 @@ public:
        void applyProperty(int id, DOM::CSSValueImpl *value);
     };
 
-    class CSSRuleData : public FastAllocated {
+    class CSSRuleData {
     public:
         CSSRuleData(uint pos, DOM::CSSStyleRuleImpl* r, DOM::CSSSelector* sel, CSSRuleData* prev = 0)
         :m_position(pos), m_rule(r), m_selector(sel), m_next(0) { if (prev) prev->m_next = this; }
@@ -242,7 +241,7 @@ public:
         CSSRuleData* m_next;
     };
 
-    class CSSRuleDataList : public FastAllocated {
+    class CSSRuleDataList {
     public:
         CSSRuleDataList(uint pos, DOM::CSSStyleRuleImpl* rule, DOM::CSSSelector* sel)
         { m_first = m_last = new CSSRuleData(pos, rule, sel); }
index 0aa5b0358b9b38ee8f6765646d1caccff10dae24..972ec8b043811a9fa6a053cba9f9eea57b3cbecb 100644 (file)
@@ -21,9 +21,7 @@
  *
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 #include <string.h>
 #include <stdlib.h>
 
index 1339135a61be9e755a90ede647c5f2693f4d0029..f9cf33a9829c53918bb19e5a0859f12e14605899 100644 (file)
@@ -21,6 +21,7 @@
  *
  */
 
+#include "config.h"
 #include "dom/dom2_events.h"
 
 #include "xml/dom2_eventsimpl.h"
index 0e4f36651e080047d014a93c6d6177ad53f78aac..bd1eb0ee8d16a2e379b0b8642f4296a03b19e0c7 100644 (file)
@@ -20,6 +20,7 @@
  *
  */
 
+#include "config.h"
 #include "dom/dom2_traversal.h"
 
 #if !KHTML_NO_CPLUSPLUS_DOM
index afa33b36e3e5366af480c2ceaf3aec906a9708eb..4b4ee47303b0c840ddf874d8e7fa94f88f8bcf05 100644 (file)
@@ -20,6 +20,7 @@
  *
  */
 
+#include "config.h"
 #include "dom_misc.h"
 
 namespace DOM {
index 856ffdc600066999013fa6f4f1c2cdd6b6c2e771..f9631f5c2f41d13a23255890ef454e6509ba14d3 100644 (file)
@@ -20,6 +20,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
 #include "dom/dom_string.h"
 #include "xml/dom_stringimpl.h"
 
index e23c198e51c9fcf225644840f91a322cdd3ded33..62cd799ace218bff6745800adc77a316ce237ace 100644 (file)
@@ -18,6 +18,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "config.h"
 #include "domparser.h"
 #include "domparser.lut.h"
 
index 54a8e83463832124727ba33fd13803615086e5d8..358563972348c86caa1f47032170ad541c8a1227 100644 (file)
@@ -18,6 +18,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "config.h"
 #include "kjs_binding.h"
 
 #include "kjs_dom.h"
index b57ff47cb9172efda58161ec90cb39b0517e87f1..a58bc129669bd48d5a0cbe035c7625a0a7197e0c 100644 (file)
@@ -20,6 +20,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "config.h"
 #include "kjs_css.h"
 
 #include "css/css_base.h"
index ab1a1d8faab1c625832ed603c0f79300d4c8167b..caea9bed8f503b3d6b3a15edccea219f1af48ff0 100644 (file)
@@ -18,6 +18,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "config.h"
 #include "kjs_dom.h"
 
 #include <kdebug.h>
index ebd637f504fc78bc1e864dd0bace1e852aa0d599..701e679eddac1c5abc4b18c7b990ccbe3479264c 100644 (file)
@@ -18,6 +18,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "config.h"
 #include "kjs_events.h"
 #include "kjs_events.lut.h"
 
index 3973b0afe1b82aee7870b290d06ff29e1bcdb4dc..3d9cb7daa7eb29295296a8c28efca2a6f6c01b86 100644 (file)
@@ -19,6 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "config.h"
 #include "kjs_html.h"
 
 #include "misc/loader.h"
@@ -4354,7 +4355,7 @@ ValueImp *KJS::Context2DFunction::callAsFunction(ExecState *exec, ObjectImp *thi
                     CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
                     size_t numComponents = CGColorSpaceGetNumberOfComponents(colorSpace);
                     size_t bytesPerRow = BYTES_PER_ROW(csw,BITS_PER_COMPONENT,(numComponents+1)); // + 1 for alpha
-                    void *_drawingContextData = malloc(csh * bytesPerRow);
+                    void *_drawingContextData = fastMalloc(csh * bytesPerRow);
                     
                     clippedSourceContext = CGBitmapContextCreate(_drawingContextData, csw, csh, BITS_PER_COMPONENT, bytesPerRow, colorSpace, kCGImageAlphaPremultipliedLast);
                     CGContextTranslateCTM (clippedSourceContext, -sx, -sy);
@@ -4364,7 +4365,7 @@ ValueImp *KJS::Context2DFunction::callAsFunction(ExecState *exec, ObjectImp *thi
                     
                     CGImageRelease (clippedSourceImage);
                     CGContextRelease (clippedSourceContext);
-                    free (_drawingContextData);
+                    fastFree (_drawingContextData);
                 }
                 
                 CGImageRelease (sourceImage);
@@ -5107,10 +5108,10 @@ Gradient::~Gradient()
         _shadingRef = 0;
     }
     
-    free (stops);
+    fastFree(stops);
     stops = 0;
     
-    free (adjustedStops);
+    fastFree(adjustedStops);
     adjustedStops = 0;
 }
 
@@ -5144,11 +5145,11 @@ void Gradient::addColorStop (float s, float r, float g, float b, float a)
 {
     if (stopCount == 0) {
         maxStops = 4;
-        stops = (ColorStop *)malloc(maxStops * sizeof(ColorStop));
+        stops = (ColorStop *)fastMalloc(maxStops * sizeof(ColorStop));
     }
     else if (stopCount+1 > maxStops) {
         maxStops *= 2;
-        stops = (ColorStop *)realloc(stops, maxStops * sizeof(ColorStop));
+        stops = (ColorStop *)fastRealloc(stops, maxStops * sizeof(ColorStop));
     }
     stops[stopCount++] = ColorStop (s, r, g, b, a);
     stopsNeedAdjusting = true;
@@ -5188,7 +5189,7 @@ const ColorStop *Gradient::colorStops(int *count) const
             adjustedStopCount++;
             
         if (adjustedStopCount != stopCount) {
-            adjustedStops = (ColorStop *)malloc(adjustedStopCount * sizeof(ColorStop));
+            adjustedStops = (ColorStop *)fastMalloc(adjustedStopCount * sizeof(ColorStop));
             memcpy (haveZeroStop ? adjustedStops : adjustedStops+1,
                 stops, stopCount*sizeof(ColorStop));
 
index e8c6a6c475abd74bf8dd28aa2e5a23dda293a106..9ff1ca750b0d258174f744536e1b7e3d8ad543c9 100644 (file)
@@ -21,6 +21,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "config.h"
 #include <klocale.h>
 
 #include <kstandarddirs.h>
index d2f1338ad85dfe7b1999894691ca4813c25a8eb0..3b7eef2a02d7758bae08fe4aa15918d2d3a6748f 100644 (file)
@@ -18,6 +18,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "config.h"
 #include "kjs_proxy.h"
 
 #include "kjs_window.h"
index 57a03e84319208457e1c645d538548f9ce97db1d..0d0c31caec4336595c6edf2bf929bf7f0c14a45f 100644 (file)
@@ -19,6 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "config.h"
 #include "kjs_range.h"
 
 #include <kdebug.h>
index 78c63a85963793e9f75db678a548cea15431b87a..dde2c636ad8d7da35ae873c7cb0ff3445aace9c6 100644 (file)
@@ -17,6 +17,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "config.h"
 #include "kjs_traversal.h"
 #include "kjs_traversal.lut.h"
 
index 308a9e33033a8c264dfea71096b6a9cf76ed66a1..ccd8a1f470e99f7250473a4073cf4d1ad36c79ce 100644 (file)
@@ -18,6 +18,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "config.h"
 #include "kjs_views.h"
 
 #include "kjs_css.h"
index dff3adc8469459a76377bdd397b852d4c219cf68..c067915fae1ab2500a8810b6b76df320980b1fc7 100644 (file)
@@ -19,6 +19,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "config.h"
 #include "kjs_window.h"
 
 #include <qstylesheet.h>
index 196a7bbff95fba3d64e9bc5610b3d0afd1c0a666..c4c3af3a3b4e516e3d18c793779a6e51119c9507 100644 (file)
@@ -17,6 +17,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "config.h"
 #include "xmlhttprequest.h"
 
 #include "kjs_window.h"
index 9d8e194a9ecf05af2600b7cd998f64b60533cb2c..e4cbbe0e19ecde30838502372885178aefadbc90 100644 (file)
@@ -18,6 +18,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include "config.h"
 #include "xmlserializer.h"
 #include "xmlserializer.lut.h"
 
index bc131d56ec494ca4acf1ece5b15df1e5ea294c1c..97cba89dabd48821f31c5d7101da00bac1a3156f 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
   
+#include "config.h"
 #include "SelectionController.h"
 
 #include <qevent.h>
index fbb883347f09c53f390f316bc68ceedb2e9df4a1..0a5e5bf43e221d0fa82f72095553d7305b939aa0 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "append_node_command.h"
 
 #include "xml/dom_nodeimpl.h"
index e9ec29382776e231d67b16fa4103f07ee11613d3..59cd6a441f1038acbc9aba8ee894114cc39d0d37 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "apply_style_command.h"
 
 #include "html_interchange.h"
index 3c2d0f681fe0495d83c9ac17823cd91b77a648ca..0a7ec8159a8df3ba8aa7f6a12787cd41e4fdc60d 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "break_blockquote_command.h"
 
 #include "htmlediting.h"
index daf712b31527062d54ba739fb0a127dbaccd67dc..60c7825d9d7c85ecf065e3d1a0e5fbf6814765c5 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "composite_edit_command.h"
 
 #include "append_node_command.h"
index 6e07d2d02ce632207ff65896ebe5f9163cfbef05..3d284d0905b5ac514e2d638018ef2dbdfecfd01e 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "delete_from_text_node_command.h"
 
 #include "xml/dom_textimpl.h"
index 441ef1adf3fab0e841f78ca161760f4d5fa8bfd7..bf2512ac049a69a7a8098aedefccf9b04f1e50b6 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "delete_selection_command.h"
 
 #include "css/css_computedstyle.h"
index 327b8d80b97abce9314610f624b7f35e210ba363..b461c20c7f97e84ecd5afc0bee22fb626269bef0 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "edit_command.h"
 #include "SelectionController.h"
 #include "khtml_part.h"
index 81567cf42132a599a18f96594af3071b6aa4304f..58f3a6e0a4971bf7da642df1323281f5d23ad1e2 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "html_interchange.h"
 
 #include <qstring.h>
index 8b40154b5d1c4e447af3cbdf976c3659be4928cf..ed1f77e8ad487a23e25fc9baac005e2d98e31cfd 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "htmlediting.h"
 
 #include "css_computedstyle.h"
index a21efa1e717562d71d130bc2b43ae2e7c765f6e7..9f514dc487966463de51157f21e79f91e728bd8e 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "insert_into_text_node_command.h"
 
 #include "xml/dom_textimpl.h"
index 41a71ea667459931d0553d88d0ddd28e9c6c6b5d..c57793f97cdb9122ddd976691c8d8184418a1e13 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "insert_line_break_command.h"
 
 #include "htmlediting.h"
index ec64c66cdd704f72dc6de320861c99ce3767fcd9..cde2bf08fe725240360626c06aa09e56dc0942ea 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "insert_node_before_command.h"
 
 #include "xml/dom_nodeimpl.h"
index f9dc8b6b768e7139a340f9ab5c9e092cf968d7bc..89425b2318ea2ee23c669ec93b76a694136c8e81 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "insert_paragraph_separator_command.h"
 
 #include "htmlediting.h"
index 406871c2e307a140a382a27750572dd8d982e914..33210defa0cc67c0b4403d9a6aa6c2acbddc0de3 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "insert_text_command.h"
 
 #include "khtml_part.h"
index 3fa6f7e1ad40422cbc7524930e1f9890d4dd2e30..86b4a29e037cdcebe29c0089267797f1d6f42a9e 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "join_text_nodes_command.h"
 
 #include "xml/dom_docimpl.h"
index 90af62b8a829b861151fb8f2e6ef5deaed4fa982..d806ff51b2cdcc1646fa09c5300cbe4f6f55a057 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #include "jsediting.h"
 
 #include "css/css_valueimpl.h"
index b63ed9517a7cf56ee23f1bf360c6eb7b526dbe32..7513d5a3f2bc7d1fa0aa59b64f168b127c88d87b 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "markup.h"
 
 #include "htmlediting.h"
index 90de4ecde8cf86fe0a425946167f7a7169a8fc63..d8c7a494e14fbbfee20ec815018ed62e95af2150 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "merge_identical_elements_command.h"
 
 #include "xml/dom_docimpl.h"
index 368c3cd822cb11c3c45e32a73c7016bb62ba419e..3166ec34cd32e07004562099cce4321914a831d8 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "move_selection_command.h"
 #include "replace_selection_command.h"
 
index 7e4b17c1f3a212cd5a22094ba399f10d3dbd1029..ef7481b2f824785ab7ad492239dd5c77ffb25613 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "rebalance_whitespace_command.h"
 
 #include "htmlediting.h"
index c32ff853f47328a91cd7d45a4eba23fb3969d27a..64bcb87bd2ba7e776a54c5928b89a1487b6656b6 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "remove_css_property_command.h"
 
 #include "css/css_valueimpl.h"
index 5528f64de9a2f8fc4e605831fa0577f43e0834fa..062b5667ac70837b548f4385c4f2481dd9c15b97 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "remove_node_attribute_command.h"
 
 #include "xml/dom_elementimpl.h"
index 0948474ecce785bbda778ea7e36fc7f923167f4e..8da553a7d6a5df30c7a98006d642ae7dd468ddb4 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "remove_node_command.h"
 
 #include "xml/dom_nodeimpl.h"
index 28e99b80132204b9ad713cfa65f72b94d69dd349..0f40ab0168521349ab0fd6ba78136f98ff79bfdc 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "remove_node_preserving_children_command.h"
 
 #include "xml/dom_nodeimpl.h"
index 64044161d1e7191dc3c38aa6df127bf7feb85f0a..8b2782fac9050a9d120da720c81eff542e42e8e0 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "replace_selection_command.h"
 
 #include "visible_position.h"
index 97b83cc62cd872adf300370744bc3c427696b0c3..5be6d6313b691a3755e2b4131065102daa17cfc6 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "set_node_attribute_command.h"
 
 #include "xml/dom_elementimpl.h"
index 95306196335d2b4f497de4c0a1484b68a65febc3..50dba0082cab01f2489b82c70d30222b76eafd7d 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "split_element_command.h"
 
 #include "xml/dom_elementimpl.h"
index e9c5ee67dd2bc848de25ccb9ba07e807a541ae76..bc100576ee6cc8e0fd52b4643c6e574f4f275d1f 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "split_text_node_command.h"
 
 #include "xml/dom_docimpl.h"
index e9aac3e99406506cc5d39760fbe4a80495957985..ba12419b98da1c5b91dc5440a606666a6ee2132e 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "split_text_node_containing_element_command.h"
 
 #include "xml/dom_textimpl.h"
index e45aeb8524af77cfc2427bdae73e84877708afb9..805c273dc63730744bc3c773961d4bfe0cbf1c5d 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "typing_command.h"
 
 #include "insert_text_command.h"
index 67d5ef64c355ada8ce6a2013b523fc3a6365fe47..11fd3f3d8c96f22431bb88cc0194b6186715ac63 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "visible_position.h"
 #include "visible_units.h"
 
index 9da6c0687936228deb8dc6c2d9a82caaf5405ded..5b8200ef3a39dd1fcd0c202b9df3b8b0167467c3 100644 (file)
@@ -23,5 +23,6 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "visible_range.h"
 
index 5abe654e72e07aa70e3d61547f5ba46be999e920..1a53164921d43ac502ff1e3f2f4d9941167aa097 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "visible_text.h"
 
 #include "htmlnames.h"
@@ -55,7 +56,7 @@ const unsigned short nonBreakingSpace = 0xA0;
 class CircularSearchBuffer {
 public:
     CircularSearchBuffer(const QString &target, bool isCaseSensitive);
-    ~CircularSearchBuffer() { free(m_buffer); }
+    ~CircularSearchBuffer() { fastFree(m_buffer); }
 
     void clear() { m_cursor = m_buffer; m_bufferFull = false; }
     void append(int length, const QChar *characters);
@@ -908,7 +909,7 @@ CircularSearchBuffer::CircularSearchBuffer(const QString &s, bool isCaseSensitiv
     m_target.replace(nonBreakingSpace, ' ');
     m_isCaseSensitive = isCaseSensitive;
 
-    m_buffer = static_cast<QChar *>(malloc(s.length() * sizeof(QChar)));
+    m_buffer = static_cast<QChar *>(fastMalloc(s.length() * sizeof(QChar)));
     m_cursor = m_buffer;
     m_bufferFull = false;
 }
index 65cc3c8a79505b204a382eb8a6e710c1eef72138..5efbce9e12820e61a44775312b1a781897aad93f 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "visible_units.h"
 
 #include <qstring.h>
index 68875da349b22ddd826bf2b05adb57012e74f24e..0781acdedf933f5a119f41a7b0c4860e8d64a7eb 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "wrap_contents_in_dummy_span_command.h"
 
 #include "apply_style_command.h"
index edb6d0f841a0859b685abaad073cbb65d10a0611..743717c55c9b7cc3ee77ce2eae983b5699e46860 100644 (file)
@@ -24,6 +24,7 @@
  */
 // -------------------------------------------------------------------------
 
+#include "config.h"
 #include "html_baseimpl.h"
 
 #include "html/html_documentimpl.h"
index 3ba8e3e05aa7b8bb886dc3bcaf3b38beaf91f9b8..2a8c00da4db0f51718fe1cb3312a4a625bb192d1 100644 (file)
@@ -23,6 +23,7 @@
  */
 // -------------------------------------------------------------------------
 //#define DEBUG
+#include "config.h"
 #include "html_blockimpl.h"
 #include "html_documentimpl.h"
 #include "css/cssstyleselector.h"
index d3b43a484908b82584f6c31efda547213a2ce475..e85eb34efbfbeee2ceacfa3bc44d130b8efefc66 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "html/html_canvasimpl.h"
 #include "html/html_documentimpl.h"
 
index c2133e8eeb5931fc5550217cc36cf49e3786cf36..56a228239d3b15d31afef65a159acb7d88d25d8b 100644 (file)
@@ -52,6 +52,7 @@
  * version of this file under any of the LGPL, the MPL or the GPL.
  */
 
+#include "config.h"
 #include "html/html_documentimpl.h"
 #include "html/html_imageimpl.h"
 #include "html/html_headimpl.h"
index 8f059bdb20ea39787015ab0176e8e6c31df788d6..7d1068224135fca2823db1e693834e1c9ac0780c 100644 (file)
@@ -28,6 +28,7 @@
 //#define EVENT_DEBUG
 //#define UNSUPPORTED_ATTR
 
+#include "config.h"
 #include "html/html_elementimpl.h"
 #include "html/html_documentimpl.h"
 #include "html/htmltokenizer.h"
index 6d355d146f58efc5d58e931c22e012015502c9cb..0e414729c253ccc41f25a61c4de1b2924bf6e8b8 100644 (file)
@@ -26,6 +26,7 @@
 #undef FORMS_DEBUG
 //#define FORMS_DEBUG
 
+#include "config.h"
 #include "html/html_formimpl.h"
 
 #include "khtmlview.h"
index 6b887543b18c8ce6e969e52a1e153f9053efa0c8..e648e7a414dccc5db2529e49541041b0bcf4643c 100644 (file)
@@ -23,6 +23,7 @@
  */
 // -------------------------------------------------------------------------
 
+#include "config.h"
 #include "html/html_headimpl.h"
 #include "html/html_documentimpl.h"
 #include "xml/dom_textimpl.h"
index 8551c5c5229b1f4c2fa6f86a21deb107dbb3cae1..cc3f2685d920f860e8a106136604d724a369621e 100644 (file)
@@ -21,6 +21,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
 #include "html/html_imageimpl.h"
 #include "html/html_formimpl.h"
 #include "html/html_documentimpl.h"
index 40373f4fe93f54758deb85a9ca1a7aedeb6fae68..bbda0d27c4d0ef05291449c7b160545b24bd8b6f 100644 (file)
@@ -23,6 +23,7 @@
  */
 // -------------------------------------------------------------------------
 
+#include "config.h"
 #include "html/html_inlineimpl.h"
 #include "html/html_imageimpl.h"
 #include "html/html_documentimpl.h"
index a0382e638fbe19d303edd93528e70e9c6f0a6837..450a395fd132b24c00b73802968b7a03eb09175e 100644 (file)
@@ -20,6 +20,7 @@
  * Boston, MA 02111-1307, USA.
  *
  */
+#include "config.h"
 #include "html_listimpl.h"
 
 #include "css/cssproperties.h"
index aedaf1ddcad010afa3d4bbc7f78af0521ad7c8bc..c7b2959de96f095581922f2fceaffe35629de351 100644 (file)
@@ -22,6 +22,7 @@
  *
  */
 // -------------------------------------------------------------------------
+#include "config.h"
 #include "html/html_miscimpl.h"
 #include "html/html_formimpl.h"
 #include "html/html_imageimpl.h"
index b474bbb8dde9c887ca34bde7efdb678c85590a14..b01f579f51ae2be4486e379584f435ed85191b86 100644 (file)
@@ -21,6 +21,7 @@
  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  */
+#include "config.h"
 #include "html/html_objectimpl.h"
 
 #include "khtml_part.h"
index 7130db4d3ed0b9114ff73100f56c1dba2da0b2c5..cb063a6c99088569b08638b3eb10ee78196a39fd 100644 (file)
@@ -24,6 +24,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
 #include "html/html_documentimpl.h"
 #include "html/html_tableimpl.h"
 
index 261e5bb0014544b58baa8cb04e4072529a802bae..311e53c4fe436d3875b9a46ffcc8cae708128f36 100644 (file)
@@ -20,6 +20,7 @@
  *
  */
 
+#include "config.h"
 #include "htmlfactory.h"
 #include "dom_docimpl.h"
 
index aeda5587805ed6a8b299247a8fd03e235731cfba..a0b9ddc99d559885b94710c8cb571d0850f1c078 100644 (file)
@@ -22,6 +22,7 @@
 
 #define DOM_HTMLNAMES_HIDE_GLOBALS 1
 
+#include "config.h"
 #include "htmlnames.h"
 
 namespace DOM { namespace HTMLNames {
index bb3b7b74e5c316721b530f169a3a58fe465878cb..1b4037a197088ef3f1280908e09ec116ac3d9a57 100644 (file)
@@ -27,6 +27,7 @@
 // KDE HTML Widget -- HTML Parser
 //#define PARSER_DEBUG
 
+#include "config.h"
 #include "html/htmlparser.h"
 
 #include "dom/dom_exception.h"
@@ -47,7 +48,6 @@
 #include "htmlfactory.h"
 #include "xml/dom_textimpl.h"
 #include "xml/dom_nodeimpl.h"
-#include <kxmlcore/FastMalloc.h>
 #include <kxmlcore/HashSet.h>
 #include "html/htmltokenizer.h"
 #include "khtmlview.h"
@@ -71,7 +71,7 @@ using namespace khtml;
 /**
  * @internal
  */
-class HTMLStackElem : public FastAllocated
+class HTMLStackElem
 {
 public:
     HTMLStackElem(const AtomicString& _tagName,
index 27bededacefcd3c9d98989aceb5ac6aab450b46c..da196d91a6192c3b974bdf629205daae0ab8116b 100644 (file)
@@ -31,9 +31,7 @@
 //#define TOKEN_DEBUG 1
 //#define TOKEN_DEBUG 2
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 //#include <string.h>
 #include "html/htmltokenizer.h"
@@ -94,9 +92,9 @@ static const char styleEnd [] =  "</style";
 static const char textareaEnd [] = "</textarea";
 static const char titleEnd [] = "</title";
 
-#define KHTML_ALLOC_QCHAR_VEC( N ) (QChar*) malloc( sizeof(QChar)*( N ) )
-#define KHTML_REALLOC_QCHAR_VEC(P, N ) (QChar*) P = realloc(p, sizeof(QChar)*( N ))
-#define KHTML_DELETE_QCHAR_VEC( P ) free((char*)( P ))
+#define KHTML_ALLOC_QCHAR_VEC( N ) (QChar*) fastMalloc( sizeof(QChar)*( N ) )
+#define KHTML_REALLOC_QCHAR_VEC(P, N ) (QChar*) P = fastRealloc(p, sizeof(QChar)*( N ))
+#define KHTML_DELETE_QCHAR_VEC( P ) fastFree((char*)( P ))
 
 // Full support for MS Windows extensions to Latin-1.
 // Technically these extensions should only be activated for pages
@@ -1756,7 +1754,7 @@ void HTMLTokenizer::enlargeBuffer(int len)
     int newsize = kMax(size*2, size+len);
     int oldoffs = (dest - buffer);
 
-    buffer = (QChar*)realloc(buffer, newsize*sizeof(QChar));
+    buffer = (QChar*)fastRealloc(buffer, newsize*sizeof(QChar));
     dest = buffer + oldoffs;
     size = newsize;
 }
@@ -1764,7 +1762,7 @@ void HTMLTokenizer::enlargeBuffer(int len)
 void HTMLTokenizer::enlargeScriptBuffer(int len)
 {
     int newsize = kMax(scriptCodeMaxSize*2, scriptCodeMaxSize+len);
-    scriptCode = (QChar*)realloc(scriptCode, newsize*sizeof(QChar));
+    scriptCode = (QChar*)fastRealloc(scriptCode, newsize*sizeof(QChar));
     scriptCodeMaxSize = newsize;
 }
 
index ef1456b2aa92d17854436ecf4b5b70ee5f45f165..5875acc37a14506f3810f383b85278e2907e0807 100644 (file)
@@ -17,6 +17,7 @@
    Boston, MA 02111-1307, USA.
 */
 
+#include "config.h"
 #include "khtml_events.h"
 #include "rendering/render_object.h"
 #include "xml/dom_nodeimpl.h"
index 4697e98d4970dc7eb07b4c052e6c5d372fff71a4..7b0b215a531877a8b7daa786fdd8ba461099e2e9 100644 (file)
@@ -24,6 +24,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
 #include "khtml_part.h"
 
 #if APPLE_CHANGES
index 6323ac92ae2ad24ba16571a859397e876a86834a..12f029040f21a47c3cef627c35e6b3df16ba972e 100644 (file)
@@ -21,6 +21,7 @@
  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  */
+#include "config.h"
 #include "khtmlview.moc"
 
 #include "khtmlview.h"
index 3a7b4aff00deca84763bc41705fab6064cb98a9a..8a7f79bae5dac223c3cbede7b070368fc3fe0eb7 100644 (file)
@@ -42,6 +42,7 @@
  * David R. Hanson, Software -- Practice and Experience, Vol. 20(1).
  */
 
+#include "config.h"
 #include "arena.h"
 
 #include <algorithm>
index 90eadcb46c84208a7de2a20bba2ba08812e57def..e18eae1e927ae5c03f3b9993336e3d4453fb1994 100644 (file)
@@ -119,7 +119,7 @@ void* ArenaAllocate(ArenaPool *pool, unsigned int nb);
          if ((pool)->current == (a)) (pool)->current = &(pool)->first; \
          *(pnext) = (a)->next; \
          CLEAR_ARENA(a); \
-         free(a); \
+         fastFree(a); \
          (a) = 0;
 
 #endif
index 2cc5e019b6f426f04f4f02fec116f94c7b24d5a1..973107ad5f99de15f24719a01d4423a079f9cbb2 100644 (file)
@@ -25,6 +25,7 @@
 
 //#define DECODE_DEBUG
 
+#include "config.h"
 #include "decoder.h"
 using namespace khtml;
 
index e44a2a777894eddea2e96cc1587fb78c49ef72a9..eaff7ca59d8fd59dacc97f63f6d3d57c8c299b6d 100644 (file)
@@ -18,6 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
 #include "formdata.h"
 
 namespace khtml {
index 84c54d9542359fb6d44d80cf71e8276ee06644d2..7130e8ab69ffaf8d379a4580e4d01ba2149f99c8 100644 (file)
@@ -21,6 +21,7 @@
  *
  */
 
+#include "config.h"
 #include "helper.h"
 
 #if APPLE_CHANGES
index 8ed8c1389e17201e443d6d09ab911bdc7a3778b8..efdc6962d41252b54e679c14ce67ac560f4e467e 100644 (file)
@@ -27,6 +27,7 @@
 
 #undef CACHE_DEBUG
 //#define CACHE_DEBUG
+#include "config.h"
 #include <assert.h>
 
 #include "loader.h"
index cb97b90c954ff522be39e729c69d4b890081cb1e..75ee2c40a5bd18be862e2351656e198bf3d4d097 100644 (file)
@@ -19,6 +19,7 @@
     Boston, MA 02111-1307, USA.
 */
 
+#include "config.h"
 #include "stringit.h"
 
 namespace khtml {
index 27255985152f859799a18f9f6b612d3808352450..43361a949728d59175059eef318b8c378202ef98 100644 (file)
@@ -20,6 +20,7 @@
  * Boston, MA 02111-1307, USA.
  *
  */
+#include "config.h"
 #include "bidi.h"
 #include "break_lines.h"
 #include "render_block.h"
index d5c40e733af38526b3b401a5b8ed7a5e74857279..8ab876ddcd85cb5288a1aeba020c13aae639c8d8 100644 (file)
@@ -20,6 +20,7 @@
  *
  */
 
+#include "config.h"
 #include "break_lines.h"
 
 #include <qstring.h>
index 7f078c0268e569325a2134ddeed6bd97f56f8be5..bf0e579da76b485a917a1d114b740e804ab8bc75 100644 (file)
@@ -23,6 +23,7 @@
  *
  */
 
+#include "config.h"
 #include "font.h"
 
 #include "khtml_factory.h"
index d9cc9e53075de4357dd1a8a319425ce26f0c9bf4..2b2c008993f4677b2e48254a94cb3d9ff9e8f375 100644 (file)
@@ -32,6 +32,7 @@
  * version of this file under any of the LGPL, the MPL or the GPL.
  */
 
+#include "config.h"
 #include "render_arena.h"
 
 #ifndef NDEBUG
index 26862ba880bde0fcadd86f1137bb0d93b85c8823..ee27bcce05c727aeb74567fbf93a1d8581702d64 100644 (file)
@@ -27,6 +27,7 @@
 //#define BOX_DEBUG
 //#define FLOAT_DEBUG
 
+#include "config.h"
 #include <kdebug.h>
 #include "rendering/render_text.h"
 #include "rendering/render_table.h"
index fb0ad88dc4f89d58fe794f072119874403d46884..46cbd5f326f0243e1a7486f0b964b93c454f1930 100644 (file)
@@ -25,6 +25,7 @@
 //#define DEBUG_LAYOUT
 
 
+#include "config.h"
 #include <qpainter.h>
 #include <qpen.h>
 
index 6ac0a9c5047615bc8187d730c5c7294e51400fe3..83a9c0c26389273ee456ccce5cab5a599a0574e7 100644 (file)
@@ -19,6 +19,7 @@
  * Boston, MA 02111-1307, USA.
  *
  */
+#include "config.h"
 #include "render_br.h"
 
 #include "dom_position.h"
index d4d827f83006bc6a53d90c7182035675cb496406..a0bbb0b821140f96f61663f191254606408f4afe 100644 (file)
@@ -19,6 +19,7 @@
  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  */
+#include "config.h"
 #include "rendering/render_canvas.h"
 #include "render_layer.h"
 #include "xml/dom_docimpl.h"
index 36534f14043adee9d8ecf7d9c2133db16725601d..e488864728ec09992a0ad32b86dfc31a4c8f92d8 100644 (file)
@@ -25,6 +25,7 @@
 
 //#define DEBUG_LAYOUT
 
+#include "config.h"
 #include "render_canvasimage.h"
 #include "render_canvas.h"
 
@@ -65,7 +66,7 @@ RenderCanvasImage::~RenderCanvasImage()
         _drawingContext = 0;
     }
     
-    free (_drawingContextData);
+    fastFree(_drawingContextData);
     _drawingContextData = 0;
     
     if (_drawnImage) {
@@ -83,14 +84,14 @@ void RenderCanvasImage::createDrawingContext()
         CFRelease (_drawingContext);
         _drawingContext = 0;
     }
-    free (_drawingContextData);
+    fastFree(_drawingContextData);
     CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
 
     int cWidth = contentWidth();
     int cHeight = contentHeight();
     size_t numComponents = CGColorSpaceGetNumberOfComponents(colorSpace);
     size_t bytesPerRow = BYTES_PER_ROW(cWidth,BITS_PER_COMPONENT,(numComponents+1)); // + 1 for alpha
-    _drawingContextData = calloc(height(), bytesPerRow);
+    _drawingContextData = fastCalloc(height(), bytesPerRow);
     _drawingContext = CGBitmapContextCreate(_drawingContextData, cWidth, cHeight, BITS_PER_COMPONENT, bytesPerRow, colorSpace, kCGImageAlphaPremultipliedLast);
     
 #ifdef DEBUG_CANVAS_BACKGROUND
index 7a8b43cf3e17bc69d66a4a4a64973b952cc5f24b..058c4ce9205e7bbfa15e979eb4baeec97c6d1396 100644 (file)
@@ -25,6 +25,7 @@
 
 //#define DEBUG_LAYOUT
 
+#include "config.h"
 #include "render_container.h"
 #include "render_table.h"
 #include "render_text.h"
index fb3f1803b29a0456e1acad143c7698a0b1382a6c..636b4b7f35da91d903e07b792f8f704d67bf65a4 100644 (file)
@@ -22,6 +22,7 @@
  *
  */
 
+#include "config.h"
 #include "render_flexbox.h"
 
 using namespace DOM;
index 69aa3893a09c7ad3fe1936ced639ac481f07420f..f6a8a93f728fa65808e0dd78aa92d44bf9eb4c59 100644 (file)
@@ -22,6 +22,7 @@
  */
 // -------------------------------------------------------------------------
 
+#include "config.h"
 #include <kdebug.h>
 #include <assert.h>
 #include <qpainter.h>
index b704315c704f5398acb2343196f6520066ac5ceb..6201d70f97651f62c455800f4f00bf4ac89b2078 100644 (file)
@@ -23,6 +23,7 @@
  *
  */
 
+#include "config.h"
 #include <kdebug.h>
 #include <klocale.h>
 #include <kfiledialog.h>
index 022e9d8632c0066fe5c59d3071f51f35d3031803..3e2a1ce8cafe27ddfac6d8cd66b83e767d6e4935 100644 (file)
@@ -24,6 +24,7 @@
  */
 //#define DEBUG_LAYOUT
 
+#include "config.h"
 #include "rendering/render_frames.h"
 
 #include "css/cssproperties.h"
index 9283c6be7bc71641c544643d05994b8fa464a912..d9afe37a6ccf465794e016e0d8ebdd6131f799d1 100644 (file)
@@ -24,6 +24,7 @@
  */
 //#define DEBUG_LAYOUT
 
+#include "config.h"
 #include "render_image.h"
 #include "render_canvas.h"
 
index 65837edf791f8468744965be7cc82a7873604b36..ebc4902b2013b2c70c10e06314db9be0dc540119 100644 (file)
@@ -22,6 +22,7 @@
  *
  */
 
+#include "config.h"
 #include <kglobal.h>
 #include "render_arena.h"
 #include "render_inline.h"
index c40952754b1a321a4b970b70353f11a03d9b0826..e31ca9df9f40e0c352ee41929ad5ffbb23fa1099 100644 (file)
@@ -41,6 +41,7 @@
  * version of this file under any of the LGPL, the MPL or the GPL.
  */
 
+#include "config.h"
 #include "render_layer.h"
 
 #include <kdebug.h>
index 4410028d2b15bc4a2809751537584874c33e89a1..cb8da9dc36ed38262c7c8b8a91267f900ac5cce4 100644 (file)
@@ -20,6 +20,7 @@
  */
 // -------------------------------------------------------------------------
 
+#include "config.h"
 #include <kdebug.h>
 #include <assert.h>
 #include <qpainter.h>
index 28e43aeb3b44e90903556d111fba8cedb5c7114a..ed60bb626b208b5fed737c1388b6e6e795e252ce 100644 (file)
@@ -22,6 +22,7 @@
  *
  */
 
+#include "config.h"
 #include "render_list.h"
 #include "rendering/render_canvas.h"
 
index 19e47c4320a5acbf6f698fd14246097accb6433c..1c322dcf62565c0836878bbe4c7e964c71ed6a09 100644 (file)
@@ -23,6 +23,7 @@
  *
  */
 
+#include "config.h"
 #include "rendering/render_object.h"
 #include "rendering/render_table.h"
 #include "rendering/render_text.h"
index 8c0d1e09440f98894bc22fb23ad9a27544f7857c..1b148c9c9dccada2fc35bdd49e8a35858acc180d 100644 (file)
@@ -21,6 +21,7 @@
  * Boston, MA 02111-1307, USA.
  *
  */
+#include "config.h"
 #include "render_replaced.h"
 
 #include "render_arena.h"
index dc5cd71f94dda994e757bdf7a44af9cc2ef212ac..ef7a0b19ceb8cc4dd294692bc5a9189bf99a7c4a 100644 (file)
@@ -21,6 +21,7 @@
  *
  */
 
+#include "config.h"
 #include "xml/dom_stringimpl.h"
 
 #include "render_style.h"
index 76ae1d7ea0b5bafb116f3582fbf94bdac12b16ae..ef0a75d396a1fe319452bedfd9533b428ee36f68 100644 (file)
@@ -41,7 +41,6 @@
 #include <qpalette.h>
 #include <qapplication.h>
 
-#include <kxmlcore/FastMalloc.h>
 #include "misc/khtmllayout.h"
 #include "misc/shared.h"
 #include "rendering/font.h"
@@ -363,7 +362,7 @@ public:
 
 enum EMarginCollapse { MCOLLAPSE, MSEPARATE, MDISCARD };
 
-class StyleSurroundData : public Shared<StyleSurroundData>, public FastAllocated
+class StyleSurroundData : public Shared<StyleSurroundData>
 {
 public:
     StyleSurroundData();
@@ -386,7 +385,7 @@ public:
 
 enum EBoxSizing { CONTENT_BOX, BORDER_BOX };
 
-class StyleBoxData : public Shared<StyleBoxData>, public FastAllocated
+class StyleBoxData : public Shared<StyleBoxData>
 {
 public:
     StyleBoxData();
@@ -464,7 +463,7 @@ enum EUnicodeBidi {
     UBNormal, Embed, Override
 };
 
-class StyleVisualData : public Shared<StyleVisualData>, public FastAllocated
+class StyleVisualData : public Shared<StyleVisualData>
 {
 public:
     StyleVisualData();
@@ -509,7 +508,7 @@ enum EBackgroundRepeat {
     REPEAT, REPEAT_X, REPEAT_Y, NO_REPEAT
 };
 
-struct BackgroundLayer : public FastAllocated {
+struct BackgroundLayer {
 public:
     BackgroundLayer();
     ~BackgroundLayer();
@@ -596,7 +595,7 @@ public:
     BackgroundLayer* m_next;
 };
 
-class StyleBackgroundData : public Shared<StyleBackgroundData>, public FastAllocated
+class StyleBackgroundData : public Shared<StyleBackgroundData>
 {
 public:
     StyleBackgroundData();
@@ -619,7 +618,7 @@ public:
 enum EMarqueeBehavior { MNONE, MSCROLL, MSLIDE, MALTERNATE, MUNFURL };
 enum EMarqueeDirection { MAUTO = 0, MLEFT = 1, MRIGHT = -1, MUP = 2, MDOWN = -2, MFORWARD = 3, MBACKWARD = -3 };
 
-class StyleMarqueeData : public Shared<StyleMarqueeData>, public FastAllocated
+class StyleMarqueeData : public Shared<StyleMarqueeData>
 {
 public:
     StyleMarqueeData();
@@ -647,7 +646,7 @@ enum EBoxOrient { HORIZONTAL, VERTICAL };
 enum EBoxLines { SINGLE, MULTIPLE };
 enum EBoxDirection { BNORMAL, BREVERSE };
 
-class StyleFlexibleBoxData : public Shared<StyleFlexibleBoxData>, public FastAllocated
+class StyleFlexibleBoxData : public Shared<StyleFlexibleBoxData>
 {
 public:
     StyleFlexibleBoxData();
@@ -669,7 +668,7 @@ public:
 };
 
 // This struct holds information about shadows for the text-shadow and box-shadow properties.
-struct ShadowData : public FastAllocated {
+struct ShadowData {
     ShadowData(int _x, int _y, int _blur, const QColor& _color)
     :x(_x), y(_y), blur(_blur), color(_color), next(0) {}
     ShadowData(const ShadowData& o);
@@ -764,7 +763,7 @@ enum EAppearance {
 // This struct is for rarely used non-inherited CSS3 properties.  By grouping them together,
 // we save space, and only allocate this object when someone actually uses
 // a non-inherited CSS3 property.
-class StyleCSS3NonInheritedData : public Shared<StyleCSS3NonInheritedData>, public FastAllocated
+class StyleCSS3NonInheritedData : public Shared<StyleCSS3NonInheritedData>
 {
 public:
     StyleCSS3NonInheritedData();
@@ -804,7 +803,7 @@ public:
 // This struct is for rarely used inherited CSS3 properties.  By grouping them together,
 // we save space, and only allocate this object when someone actually uses
 // an inherited CSS3 property.
-class StyleCSS3InheritedData : public Shared<StyleCSS3InheritedData>, public FastAllocated
+class StyleCSS3InheritedData : public Shared<StyleCSS3InheritedData>
 {
 public:
     StyleCSS3InheritedData();
index f6051f699d052e42ca8b3386af5c2ff7eed1b82b..64fdea1e154c10450b17db5d3ed0efd82acaf561 100644 (file)
@@ -28,6 +28,7 @@
 //#define TABLE_PRINT
 //#define DEBUG_LAYOUT
 //#define BOX_DEBUG
+#include "config.h"
 #include "rendering/render_table.h"
 #include "rendering/table_layout.h"
 #include "html/html_tableimpl.h"
index f4bc19beddc0268bfd5eaf72018f4d19a47adf53..935803f118fa6c43c66bd15455d9e709491b901d 100644 (file)
@@ -24,6 +24,7 @@
 //#define DEBUG_LAYOUT
 //#define BIDI_DEBUG
 
+#include "config.h"
 #include "rendering/render_text.h"
 
 #include "rendering/render_canvas.h"
index 11e92461f222e099149260481b291123619e1de1..73588874f72fa81d05b0260f331083b8a701c439 100644 (file)
@@ -19,6 +19,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
 #include "render_theme.h"
 
 #include "render_style.h"
index 6e8e0aefc175f6665e60c7bab1cd81e33068acd6..0caa043b5e48d8de04926585214ede2d5a4b1379 100644 (file)
@@ -19,6 +19,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
 #import "render_theme_mac.h"
 
 #import "render_style.h"
index a84f13f1eb2dcf8cddd1bf7eca89d1c118a6620b..1dab455418cac282e550c3266483f0dfa62bd737 100644 (file)
@@ -22,6 +22,7 @@
  *
  * $Id$
  */
+#include "config.h"
 #include "table_layout.h"
 #include "render_table.h"
 
index 642ee491ecdf3cbddde81a931d12413c12b7e276..6f5d894f9267328f43e937ddd4fdef02c56ef57b 100644 (file)
@@ -1,5 +1,6 @@
 #ifndef KHTML_NO_XBL
 
+#include "config.h"
 #include <kurl.h>
 #include "xbl_protobinding.h"
 #include "xbl_binding.h"
index bc171bbd3346e504f858f3cc0f22b24d2b43ee73..2ee6b341c97d2596df5d21928f33c1bd5dab5046 100644 (file)
@@ -1,5 +1,6 @@
 #ifndef KHTML_NO_XBL
 
+#include "config.h"
 #include "qptrdict.h"
 #include "xml/dom_docimpl.h"
 #include "xml/dom_elementimpl.h"
index 46f744bfb4ee0c597ff50aa96d0611a3f194a170..cf11eb85907db995929920796e1109c649f76621 100644 (file)
@@ -1,5 +1,6 @@
 #ifndef KHTML_NO_XBL
 
+#include "config.h"
 #include "xbl_docimpl.h"
 #include "xbl_tokenizer.h"
 #include "xbl_protobinding.h"
index 2640fb621e68d00d1b1511217099569f4d97dfa0..3669111361c4fceb7fe8cf4418137ab46a16b45c 100644 (file)
@@ -1,5 +1,6 @@
 #ifndef KHTML_NO_XBL
 
+#include "config.h"
 #include "xbl_protobinding.h"
 #include "xbl_docimpl.h"
 
index 689d3a4e2dc19e7c409c5fddd15d9e16af5e7592..3a344682c579fd855f3b69886c5a988f5fd8ed3c 100644 (file)
@@ -1,5 +1,6 @@
 #ifndef KHTML_NO_XBL
 
+#include "config.h"
 #include "qstringlist.h"
 #include "qstring.h"
 #include "xbl_protohandler.h"
index 1a5dc32b1e60932420c6f55855b0050e6cef5bbf..ba1d93d93b4c67ac3be4484be1fe574d34d18654 100644 (file)
@@ -1,5 +1,6 @@
 #ifndef KHTML_NO_XBL
 
+#include "config.h"
 #include "xbl_protoimplementation.h"
 #include "xbl_protobinding.h"
 
index 727b23c3ffba7545ecff3818d0484483e82b0dd2..3627c9de47a59e0964e8b309a5229f355c803bb5 100644 (file)
@@ -1,5 +1,6 @@
 #ifndef KHTML_NO_XBL
 
+#include "config.h"
 #include "dom/dom_node.h"
 #include "xml/dom_elementimpl.h"
 
index 60fcdc3439128d05b84dffab2cc0e9fafdd6e8f6..487329a87379a9c6576faacb4904f6f8b0721c52 100644 (file)
@@ -22,6 +22,7 @@
 
 #define DOM_EVENT_NAMES_HIDE_GLOBALS 1
 
+#include "config.h"
 #include "EventNames.h"
 
 using DOM::AtomicString;
index ae32f75e57efa88c5bb95e6b89e218acd255fc7c..2e2ccfac49445b1178b92aa38c38f4620332241c 100644 (file)
@@ -21,6 +21,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
 #include "xml/dom2_eventsimpl.h"
 
 #include "dom/dom2_events.h"
index fcf4ed264d4c5e733bbf65939eb963bb9aed6a6c..35995f272609abfb80f52277a12f35d94762d271 100644 (file)
@@ -44,7 +44,7 @@ class EventListener;
 class NodeImpl;
 class ClipboardImpl;
 
-class EventImpl : public khtml::Shared<EventImpl>, public FastAllocated
+class EventImpl : public khtml::Shared<EventImpl>
 {
 public:
     EventImpl();
@@ -359,7 +359,7 @@ private:
     int m_wheelDelta;
 };
 
-class RegisteredEventListener : public FastAllocated {
+class RegisteredEventListener {
 public:
     RegisteredEventListener(const AtomicString &eventType, EventListener *listener, bool useCapture);
     ~RegisteredEventListener();
@@ -381,7 +381,7 @@ bool operator==(const RegisteredEventListener &, const RegisteredEventListener &
 inline bool operator!=(const RegisteredEventListener &a, const RegisteredEventListener &b) { return !(a == b); }
 
 // State available during IE's events for drag and drop and copy/paste
-class ClipboardImpl : public khtml::Shared<ClipboardImpl>, public FastAllocated {
+class ClipboardImpl : public khtml::Shared<ClipboardImpl> {
 public:
     ClipboardImpl() { }
     virtual ~ClipboardImpl();
index 1ed8a7610ae0d750d2b6869a2afe24db598c2046..fa371ac00e2cb2923f4166d6a2ef365dab8c7b86 100644 (file)
@@ -23,6 +23,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
 #include "dom2_rangeimpl.h"
 
 #include "dom/dom_exception.h"
index a184fe69144680fbcf92124932a001cf46938d4d..2ef1ff31d25686fdcace427a508bc8a04d590042 100644 (file)
@@ -29,7 +29,6 @@
 
 #include "dom/dom2_range.h"
 #include "misc/shared.h"
-#include <kxmlcore/FastMalloc.h>
 
 namespace DOM {
 
@@ -39,7 +38,7 @@ class DOMString;
 class NodeImpl;
 class Position;
 
-class RangeImpl : public khtml::Shared<RangeImpl>, public FastAllocated
+class RangeImpl : public khtml::Shared<RangeImpl>
 {
     friend class DocumentImpl;
 public:
index 6de76c2c39e6223f7974eb1464db16fb3d1bd72f..9486c020dd679c54397bafd1e83dd8dffb6ebc4e 100644 (file)
@@ -22,6 +22,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
 #include "xml/dom2_traversalimpl.h"
 #include "dom/dom_exception.h"
 #include "xml/dom_docimpl.h"
index ba235f90d10e63227b7e107ae5469acd836ac59e..0076103b7a3b9706b36519701d3c9ba4e7f453ce 100644 (file)
 
 #include "dom/dom2_traversal.h"
 #include "misc/shared.h"
-#include <kxmlcore/FastMalloc.h>
 
 namespace DOM {
 
 class NodeImpl;
 class DocumentImpl;
 
-class NodeFilterImpl : public khtml::Shared<NodeFilterImpl>, public FastAllocated
+class NodeFilterImpl : public khtml::Shared<NodeFilterImpl>
 {
 public:
     NodeFilterImpl(NodeFilterCondition *);
@@ -50,7 +49,7 @@ private:
     NodeFilterCondition *m_condition;
 };
 
-class TraversalImpl : public khtml::Shared<TraversalImpl>, public FastAllocated
+class TraversalImpl : public khtml::Shared<TraversalImpl>
 {
 public:
     TraversalImpl(NodeImpl *, int whatToShow, NodeFilterImpl *, bool expandEntityReferences);
index 7a42f50e64b2d44a4dd2062cc95f28cbb32c7b70..056d221c916e2b3dc3c8ae17121967d4edeba5d7 100644 (file)
@@ -21,6 +21,7 @@
  *
  */
 
+#include "config.h"
 #include "dom2_viewsimpl.h"
 
 #include "css/css_computedstyle.h"
index 71440d1422f0593262c3ed82a34b960359ef48c6..12be93d8425b6c79cc42c4556e8e7d3aea49f158 100644 (file)
@@ -25,7 +25,6 @@
 
 #include "css/css_valueimpl.h"
 #include "misc/shared.h"
-#include <kxmlcore/FastMalloc.h>
 
 namespace DOM {
 
@@ -35,7 +34,7 @@ class ElementImpl;
 class DOMStringImpl;
 
 // Introduced in DOM Level 2:
-class AbstractViewImpl : public khtml::Shared<AbstractViewImpl>, public FastAllocated
+class AbstractViewImpl : public khtml::Shared<AbstractViewImpl>
 {
 public:
     AbstractViewImpl(DocumentImpl *_document);
index fd5ed756703bb2b4566993bd81c6a89dd9853d11..c15001afca5de88ddf7bd7923cc715a7e688a78d 100644 (file)
@@ -28,6 +28,7 @@
 
 #define KHTML_ATOMICSTRING_HIDE_GLOBALS 1
 
+#include "config.h"
 #include "dom_atomicstring.h"
 #include "xml/dom_stringimpl.h"
 #include <kxmlcore/HashSet.h>
index d34420fd089a97fda20e5bce5ea2c8c59bedf750..127f62ee5728aee456797a3c598a7ba29fe6c390 100644 (file)
@@ -22,6 +22,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
 #include "dom_docimpl.h"
 
 #include "dom/dom_exception.h"
index ff433883cc7cd4b584638252d2f5e2eab5059663..e322db4b71f480205c39550745121d132194173c 100644 (file)
@@ -125,7 +125,7 @@ namespace DOM {
         }
     };
     
-class DOMImplementationImpl : public khtml::Shared<DOMImplementationImpl>, public FastAllocated
+class DOMImplementationImpl : public khtml::Shared<DOMImplementationImpl>
 {
 public:
     DOMImplementationImpl();
index 615d4e9da2a6af1f1404597b6ccadbadef2eb93f..4c31a5f3d4cb3252359963b1fa0a27be310ade0a 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 //#define EVENT_DEBUG
+#include "config.h"
 #include "dom/dom_exception.h"
 #include "dom/dom_node.h"
 #include "xml/dom_textimpl.h"
index 3e6f2d8e39c55710ba559b123d94800d9afe8f64..a4c127573e0d81d941e94d52597a3279537b9b27 100644 (file)
@@ -58,7 +58,7 @@ class AttrImpl;
 // the actual Attr (AttrImpl) with its value as textchild
 // is only allocated on demand by the DOM bindings.
 // Any use of AttrImpl inside khtml should be avoided.
- class AttributeImpl : public khtml::Shared<AttributeImpl>, public FastAllocated
+ class AttributeImpl : public khtml::Shared<AttributeImpl>
 {
     friend class NamedAttrMapImpl;
     friend class ElementImpl;
index e025e32fb092a1a501723fd9fc0427468b3d97f2..472f45e92366fd050cff37ca812c809f3222e1ac 100644 (file)
@@ -22,6 +22,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
 #include "xml/dom_nodeimpl.h"
 
 #include "dom/dom_exception.h"
index e9321db70be1950c05f710a08ac7305d1c27b7d4..d6c48a5307c072c2456887c393a0c406b6f36998 100644 (file)
@@ -27,7 +27,6 @@
 
 #include "dom/dom_string.h"
 #include "dom/dom_node.h"
-#include <kxmlcore/FastMalloc.h>
 #include "misc/helper.h"
 #include "misc/shared.h"
 #include "dom_atomicstring.h"
@@ -76,7 +75,7 @@ private:
 };
 
 // this class implements nodes, which can have a parent but no children:
-class NodeImpl : public khtml::TreeShared<NodeImpl>, public FastAllocated
+class NodeImpl : public khtml::TreeShared<NodeImpl>
 {
     friend class DocumentImpl;
 public:
@@ -565,7 +564,7 @@ public:
 class Node;
 class NodeImpl;
 
-class NodeListImpl : public khtml::Shared<NodeListImpl>, public FastAllocated
+class NodeListImpl : public khtml::Shared<NodeListImpl>
 {
 public:
     NodeListImpl( NodeImpl *_rootNode );
@@ -636,7 +635,7 @@ protected:
 // Generic NamedNodeMap interface
 // Other classes implement this for more specific situations e.g. attributes
 // of an element
-class NamedNodeMapImpl : public khtml::Shared<NamedNodeMapImpl>, public FastAllocated
+class NamedNodeMapImpl : public khtml::Shared<NamedNodeMapImpl>
 {
 public:
     NamedNodeMapImpl() {}
index c14c607838d6309d70fc3c7397952d4e28e6fd34..00342442cf1411f5023b4fb554346f365eebd426 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "dom_position.h"
 
 #include <qstring.h>
index 73cdfd28121fd6179cd69a5b5cecc1cd62af264c..cbfc090c782664c373c761e0405c1bb8e0df7691 100644 (file)
@@ -21,6 +21,7 @@
 
 #define KHTML_QNAME_HIDE_GLOBALS 1
 
+#include "config.h"
 #include "dom_qname.h"
 #include <kxmlcore/HashSet.h>
 
index abea3588316baf96fb04a34121721953ca499488..efcf54362d7ad5fac5eb9efce6bca2dae7171aba 100644 (file)
@@ -23,6 +23,7 @@
  *
  */
 
+#include "config.h"
 #include "dom_stringimpl.h"
 
 #include <kdebug.h>
index f1fc77e8c9d7987095bb583e34a7d55612840252..fd7cd0728002d6d71ad9270f33bb9b331a145399 100644 (file)
 
 #include "misc/khtmllayout.h"
 #include "misc/shared.h"
-#include <kxmlcore/FastMalloc.h>
 
 #define QT_ALLOC_QCHAR_VEC(N) static_cast<QChar*>(fastMalloc(sizeof(QChar)*(N)))
 #define QT_DELETE_QCHAR_VEC(P) fastFree(P)
 
 namespace DOM {
 
-class DOMStringImpl : public khtml::Shared<DOMStringImpl>, public FastAllocated
+class DOMStringImpl : public khtml::Shared<DOMStringImpl>
 {
 private:
     struct WithOneRef { };
index 83124a92ae063903932edd25c88b507a612303df..2346057e11650b9db31477401bccd2d81487b036 100644 (file)
@@ -21,6 +21,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
 #include "dom/dom_exception.h"
 #include "css/cssstyleselector.h"
 #include "xml/dom2_eventsimpl.h"
index 953c935258f3bce4e84a0181e942b8a8c664cbb5..ae8dc43b89f77be62b2a939ed494c069f754e150 100644 (file)
@@ -19,6 +19,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
 #include "dom/dom_exception.h"
 
 #include "xml/dom_xmlimpl.h"
index ca635d2ecee687d40db4afd60bb2b31412bc5d9e..0d76d2f6007b655af8f140b52dc55d3fdf6d6f5d 100644 (file)
@@ -20,6 +20,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include "config.h"
 #include "xml_tokenizer.h"
 #include "xml/dom_docimpl.h"
 #include "xml/dom_elementimpl.h"
index b3bfe09c26f31ff2ca12be120ccdc6748a163656..6b059913a73c0abac11f6433d4614d0e3072a566 100644 (file)
@@ -21,6 +21,7 @@
 
 #ifdef KHTML_XSLT
 
+#include "config.h"
 #include "dom/dom_string.h"
 #include "dom/dom_exception.h"
 
index a36e241f7dafe62747f45dd345aef8580b106575..2023175bc196b0fd56da59e83584cff4fab5a076 100644 (file)
@@ -21,6 +21,7 @@
 
 #ifdef KHTML_XSLT
 
+#include "config.h"
 #include "xslt_processorimpl.h"
 #include "xsl_stylesheetimpl.h"
 #include "html_documentimpl.h"
index d6ac861b23e181c58df6f31c0890728ed6ab6eba..ac6e037f965336d1f2743ba17dfb4d9715e7df3c 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #import "DOMCSS.h"
 
 #include <objc/objc-class.h>
index 4e539b6889268e899caa6f50051836f6b78f5c79..c8feaabe66ed893666cbe0931bf0948969126606 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "DOM.h"
 
 #include <objc/objc-class.h>
index eeacac5eb77692d8b83126b52fb937385b559aaf..29b874a071c249c7eae7eae729c1e6353d4f0e09 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "DOMEvents.h"
 
 #import "DOMEventsInternal.h"
index c0583bcd44698d0b45e8abdc2abaccca2c0998fd..f38d890c04303bb8fd46c4548124f0a3acff5bcf 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "DOMHTML.h"
 
 #import "dom_string.h"
index de10de63a6f39c2ea434a1de0c51a5cced481f41..6633cd10a941b6ce9cb2cb501a2b01de0bbac937 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "DOMInternal.h"
 
 #import "css_stylesheet.h"
@@ -134,14 +135,14 @@ DOMString::DOMString(NSString *str)
         UniChar fixedSizeBuffer[1024];
         UniChar *buffer;
         if (size > static_cast<CFIndex>(sizeof(fixedSizeBuffer) / sizeof(UniChar))) {
-            buffer = static_cast<UniChar *>(malloc(size * sizeof(UniChar)));
+            buffer = static_cast<UniChar *>(fastMalloc(size * sizeof(UniChar)));
         } else {
             buffer = fixedSizeBuffer;
         }
         CFStringGetCharacters(reinterpret_cast<CFStringRef>(str), CFRangeMake(0, size), buffer);
         m_impl = new DOMStringImpl(reinterpret_cast<const QChar *>(buffer), (uint)size);
         if (buffer != fixedSizeBuffer) {
-            free(buffer);
+            fastFree(buffer);
         }
     }
     m_impl->ref();
index aba76bfb901e0a3454fc28621b1ea45f961c7702..db368016294af5b45ace4e96343f6b9a11e30f36 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "kjs_dom.h"
 #import "dom_nodeimpl.h"
 
index ceedb1de9bc0c5689495d7f7e689dbd270bdcea1..986494ca2de8230f5489073842e231ce155fd348 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "DOMViews.h"
 
 #import "DOMInternal.h"
index 5a4a5b7b9a7a12dde2ee79ab3b0c423e12e006c4..4a67427c6b1fb992cd43a1c557654592b9eb866f 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #import "KWQAccObject.h"
 
 // need this until accesstool supports arrays of markers
index bdd1e3b871932c4540b4787ae112333a84614226..c404c1f9eed0f6e392470f6a9b2f1b0bbf5eb9c0 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #import "KWQAccObjectCache.h"
 
 #import "KWQAccObject.h"
index 77e8a8c866781209653f333086595885cbe2fb5f..1eb2c1141e223d42ca2ba99f0d2748e7d369eb7f 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQApplication.h"
 #import "KWQStyle.h"
 
index b5491518dfaec12d64a9eccfcee6c2f7b837f4aa..dfafd29965c6dec501a5684ee59d04284b447697 100644 (file)
@@ -52,7 +52,7 @@ class KWQArrayImpl
     bool operator==(const KWQArrayImpl &) const;
 
  private:
-    class KWQArrayPrivate : public FastAllocated
+    class KWQArrayPrivate
     {
     public:    
        KWQArrayPrivate(size_t pNumItems, size_t pItemSize);
index b60b14b3468918c5550edd5e4e0985f8b942949d..0a3b999f7dc02e42a9599321cf44b1f5aad0112e 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQArrayImpl.h"
 
 #import <new>
index 48e0d4b349cdddbff9639293c0654fdea5d5bcc9..faccab2d522828322d33e57097da630e6f595d4d 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQBuffer.h"
 
 void QBuffer::open(int)
index e058079545a470bd7f8d7201a6faccfcab575e03..45003e247222bdceda4757b521f9f7660057c0bf 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQButton.h"
 
 #import <kxmlcore/Assertions.h>
index 29540a69bded0ebe2a2a047d0970cc30827f7b83..4b3b7ae49f974ccd9f3d4869dfaf68377cdd697f 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQCString.h"
 
 #import <kxmlcore/Assertions.h>
index 1aa4e9939b651b91c6a3617018f1e90a57946c2f..bc2e7b6cab125020c276922bad66252396d0524c 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQCharsets.h"
 
 struct CharsetEntry {
index 0a72ac55831a046f556345e7197c2aaa8a3099ee..4862d935496c6f8b71af70951e5982846a0a1428 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQClipboard.h"
 #import <kxmlcore/Assertions.h>
 #import "KWQFoundationExtras.h"
index 2fc565fef274fa5547da922234d3ffd1ccb070f0..79a6c902991357c9f7c7b91349adadfc936b6040 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQCollection.h"
 
 QPtrCollection::~QPtrCollection()
index d174afc5dfed00cb8b461e2516e47043219107a5..f718e4aa6f44dc6a3ef434b8d9c22be25d78aac9 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQColor.h"
 
 #import "KWQNamespace.h"
index dadff12f57bd5aa50e8a714f5266bffa60956f60..3d18c13f11f80e6d33bbe6c7b64c697c30a720e2 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQComboBox.h"
 
 #import <kxmlcore/Assertions.h>
index fdbb7cbd8439175e0797930260b8acb4d70f85ab..5e5d3e5ab3997709f867d10b2833b74ba3388d72 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQCursor.h"
 #import "KWQLogging.h"
 #import "KWQFoundationExtras.h"
index bbf63bf404f6d0a245ac703344c6e90147704e82..2d3a42f72a390e8cdd5d9268ee0baf50952a3c96 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import <Foundation/Foundation.h>
 #import "KWQDateTime.h"
 #import <time.h>
index dbcef596753786f1b4b680bfb1425ad8a63c6067..a0bc3f0066692056822acb2a661dc77711099d37 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQDictImpl.h"
 #import <CoreFoundation/CoreFoundation.h>
 
index a1302283d294f157e64eebbf4b7ad909bbd54198..a2e687d1f75060638bdd7f938f072b756fab2b84 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQEditCommand.h"
 
 #import <kxmlcore/Assertions.h>
index d67771f4704c575fdb9343b052f2b05230b34c0c..cd4099047c3206ba163ae58d4150e1f2ce8b2eb6 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQEvent.h"
 
 #import "KWQLogging.h"
index 21cc2188d75317801704d975cd26d23aa25c6d9d..cc9a38c1f19f24c2dfc4b65f6559c18642b2a6e0 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQExceptions.h"
 
 void KWQReportBlockedException(KWQNSHandler& _localHandler)
index 60530b6b2ca1df995a6d9048530abd17a5aea101..9ad0176824f3f5794746287c1c2d7364309c71c4 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQFile.h"
 
 // This NSString call can't throw so no need to block exceptions
index a46e611ae5b084a8a5427a221a4eaeb6056ec6a1..c00f518a0d432067815626e257477109dc16b268 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQFileButton.h"
 
 #import <kxmlcore/Assertions.h>
index a4e9936241bbdbb2fbfb9717fcfc7128152161af..06c1d4141093e172050b6ea15034573afd3a6971 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQFont.h"
 
 #import "KWQExceptions.h"
index 62af3026c59d7b896e926ccfd7ed5760a2a4e45e..1c0ed3be058382ea9036f5f29170b9564ba7d149 100644 (file)
@@ -33,7 +33,7 @@
 class NSString;
 #endif
 
-class KWQFontFamily : public FastAllocated {
+class KWQFontFamily {
 public:
     KWQFontFamily();
     ~KWQFontFamily() { if (_next) _next->deref();  }
index cebbe76de23bf3b3fed291e885aabb08efda3275..5cd772b9c0dcdd9c3b6e1d09447e3c99d81201b0 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #include "KWQFontFamily.h"
 #include "xml/dom_stringimpl.h"
 
index 1653f2c313fa219a95871588c5aaa4c616044c66..daedae608e83d0d08b2c50842ce351f0d8ec1794 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQFontMetrics.h"
 
 #import <Cocoa/Cocoa.h>
index cfd671aa782d4bb563ca14937fca3b4c2515b48a..2564681da7e0fdf0191083e562f6218ae82846a6 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQFormData.h"
 
 #import <kxmlcore/Assertions.h>
index 75b80d1a090523014f1467552ad818a7cb4f3acd..d816d4188010bb681dbf79d5a37808a605187351 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQFrame.h"
 
 #import "KWQExceptions.h"
index 4db8d7fa0ab1d6a5fb1c17f206b8711c3b136de9..01c5df66541fea442aef526acd66c0f465c21db1 100644 (file)
@@ -23,6 +23,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
+
 void qDebug(const char *msg, ...)
 {
 }
index 3c92b504480f715ce0db0bdd1a7fdd84fa49beff..345a1a0bb577176311338de479afb95d64226bcc 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQGuardedPtr.h"
 
 #import "KWQObject.h"
index 593f8e47fba2ccbedba7ea066f0e2d78744795cc..3ccbf8690a1984bc314495a7dbfe842e32f5bed6 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQKCharsets.h"
 
 #import "KWQTextCodec.h"
index 46e2576377bee14f0b3a17b1d0fef67f1f4eb8fe..78cda4be7facdf9a8621402a1df0f9f4a98746f7 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
+#include "config.h"
 #import "KWQKConfigBase.h"
 
 #import "KWQColor.h"
index f0cde65c047084a397ed6b12706db24407ba50da..aa32878738d1d060bc956c2558ec799139c0f39d 100644 (file)
@@ -23,6 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "config.h"
 #import "KWQKCookieJar.h"
 
 #import "KWQExceptions.h"