Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: core/src/fxcrt/fx_basic_list.cpp

Issue 372473003: Remove custom memory manager (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Change malloc to calloc Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fxcrt/fx_basic_buffer.cpp ('k') | core/src/fxcrt/fx_basic_maps.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: 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 bf7091268beda104d5f329b2218deefc51754ec2..c9619f99b79fecbfbb48e705725c9a9ea7f66ae9 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--) {
« no previous file with comments | « core/src/fxcrt/fx_basic_buffer.cpp ('k') | core/src/fxcrt/fx_basic_maps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698