From 3522876d5291922ddc62bf1b70d02743b0850673 Mon Sep 17 00:00:00 2001 From: Bo Xu Date: Tue, 8 Jul 2014 15:30:46 -0700 Subject: Remove custom memory manager BUG= R=palmer@chromium.org Review URL: https://codereview.chromium.org/372473003 --- core/src/fxcrt/fx_basic_list.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'core/src/fxcrt/fx_basic_list.cpp') diff --git a/core/src/fxcrt/fx_basic_list.cpp b/core/src/fxcrt/fx_basic_list.cpp index bf7091268b..c9619f99b7 100644 --- a/core/src/fxcrt/fx_basic_list.cpp +++ b/core/src/fxcrt/fx_basic_list.cpp @@ -1,14 +1,13 @@ // Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - + // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "../../include/fxcrt/fx_basic.h" #include "plex.h" -CFX_PtrList::CFX_PtrList(int nBlockSize, IFX_Allocator* pAllocator) - : m_pAllocator(pAllocator) - , m_pNodeHead(NULL) +CFX_PtrList::CFX_PtrList(int nBlockSize) + : m_pNodeHead(NULL) , m_pNodeTail(NULL) , m_nCount(0) , m_pNodeFree(NULL) @@ -84,14 +83,14 @@ void CFX_PtrList::RemoveAll() { m_nCount = 0; m_pNodeHead = m_pNodeTail = m_pNodeFree = NULL; - m_pBlocks->FreeDataChain(m_pAllocator); + m_pBlocks->FreeDataChain(); m_pBlocks = NULL; } CFX_PtrList::CNode* CFX_PtrList::NewNode(CFX_PtrList::CNode* pPrev, CFX_PtrList::CNode* pNext) { if (m_pNodeFree == NULL) { - CFX_Plex* pNewBlock = CFX_Plex::Create(m_pAllocator, m_pBlocks, m_nBlockSize, sizeof(CNode)); + CFX_Plex* pNewBlock = CFX_Plex::Create(m_pBlocks, m_nBlockSize, sizeof(CNode)); CNode* pNode = (CNode*)pNewBlock->data(); pNode += m_nBlockSize - 1; for (int i = m_nBlockSize - 1; i >= 0; i--, pNode--) { -- cgit v1.2.3