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

Issue 372473003: Remove custom memory manager (Closed)

Created:
6 years, 5 months ago by Bo Xu
Modified:
6 years, 5 months ago
Reviewers:
palmer, jam, Chris Evans
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Visibility:
Public.

Description

Remove custom memory manager BUG= R=palmer@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/3522876

Patch Set 1 #

Total comments: 15

Patch Set 2 : Change malloc to calloc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+401 lines, -2417 lines) Patch
M core/include/fxcrt/fx_basic.h View 1 36 chunks +31 lines, -102 lines 0 comments Download
M core/include/fxcrt/fx_memory.h View 1 4 chunks +49 lines, -215 lines 0 comments Download
M core/include/fxcrt/fx_stream.h View 6 chunks +12 lines, -12 lines 0 comments Download
M core/include/fxcrt/fx_string.h View 2 chunks +1 line, -27 lines 0 comments Download
M core/include/fxcrt/fx_xml.h View 10 chunks +20 lines, -50 lines 0 comments Download
M core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download
M core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp View 1 4 chunks +0 lines, -4 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp View 1 1 chunk +0 lines, -1 line 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp View 1 1 chunk +0 lines, -1 line 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp View 1 2 chunks +0 lines, -2 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp View 1 1 chunk +0 lines, -1 line 0 comments Download
M core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp View 1 2 chunks +0 lines, -2 lines 0 comments Download
M core/src/fpdfdoc/doc_metadata.cpp View 1 1 chunk +0 lines, -1 line 0 comments Download
M core/src/fxcodec/codec/fx_codec.cpp View 1 3 chunks +2 lines, -4 lines 0 comments Download
M core/src/fxcodec/codec/fx_codec_fax.cpp View 1 chunk +37 lines, -2 lines 0 comments Download
M core/src/fxcodec/codec/fx_codec_flate.cpp View 1 1 chunk +0 lines, -1 line 0 comments Download
M core/src/fxcodec/codec/fx_codec_jpeg.cpp View 1 1 chunk +0 lines, -1 line 0 comments Download
M core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.c View 3 chunks +4 lines, -9 lines 0 comments Download
M core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/j2k.c View 1 chunk +0 lines, -40 lines 0 comments Download
M core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/opj_malloc.h View 2 chunks +1 line, -11 lines 0 comments Download
M core/src/fxcodec/lcms2/lcms2-2.6/src/cmserr.c View 3 chunks +4 lines, -4 lines 0 comments Download
M core/src/fxcrt/extension.h View 12 chunks +17 lines, -32 lines 0 comments Download
M core/src/fxcrt/fx_basic_array.cpp View 1 11 chunks +25 lines, -31 lines 0 comments Download
M core/src/fxcrt/fx_basic_bstring.cpp View 2 chunks +1 line, -33 lines 0 comments Download
M core/src/fxcrt/fx_basic_buffer.cpp View 9 chunks +16 lines, -27 lines 0 comments Download
M core/src/fxcrt/fx_basic_list.cpp View 2 chunks +5 lines, -6 lines 0 comments Download
M core/src/fxcrt/fx_basic_maps.cpp View 1 15 chunks +28 lines, -39 lines 0 comments Download
M core/src/fxcrt/fx_basic_memmgr.cpp View 1 3 chunks +10 lines, -284 lines 0 comments Download
D core/src/fxcrt/fx_basic_memmgr_mini.cpp View 1 chunk +0 lines, -822 lines 0 comments Download
M core/src/fxcrt/fx_basic_plex.cpp View 2 chunks +6 lines, -6 lines 0 comments Download
M core/src/fxcrt/fx_basic_utf.cpp View 2 chunks +1 line, -13 lines 0 comments Download
M core/src/fxcrt/fx_basic_wstring.cpp View 2 chunks +1 line, -53 lines 0 comments Download
M core/src/fxcrt/fx_extension.cpp View 3 chunks +29 lines, -45 lines 0 comments Download
M core/src/fxcrt/fx_xml_composer.cpp View 2 chunks +5 lines, -7 lines 0 comments Download
M core/src/fxcrt/fx_xml_parser.cpp View 30 chunks +61 lines, -206 lines 0 comments Download
M core/src/fxcrt/fxcrt_platforms.h View 1 chunk +1 line, -1 line 0 comments Download
M core/src/fxcrt/fxcrt_platforms.cpp View 2 chunks +4 lines, -12 lines 0 comments Download
M core/src/fxcrt/fxcrt_posix.h View 1 chunk +1 line, -1 line 0 comments Download
M core/src/fxcrt/fxcrt_posix.cpp View 2 chunks +4 lines, -12 lines 0 comments Download
M core/src/fxcrt/fxcrt_windows.h View 2 chunks +2 lines, -2 lines 0 comments Download
M core/src/fxcrt/fxcrt_windows.cpp View 3 chunks +5 lines, -13 lines 0 comments Download
D core/src/fxcrt/mem_int.h View 1 chunk +0 lines, -232 lines 0 comments Download
M core/src/fxcrt/plex.h View 2 chunks +3 lines, -3 lines 0 comments Download
M core/src/fxcrt/xml_int.h View 10 chunks +12 lines, -26 lines 0 comments Download
M core/src/fxge/dib/fx_dib_convert.cpp View 1 3 chunks +0 lines, -4 lines 0 comments Download
M core/src/fxge/dib/fx_dib_engine.cpp View 1 2 chunks +0 lines, -2 lines 0 comments Download
M core/src/fxge/dib/fx_dib_main.cpp View 1 1 chunk +0 lines, -1 line 0 comments Download
M core/src/fxge/win32/fx_win32_dib.cpp View 1 1 chunk +0 lines, -1 line 0 comments Download
M core/src/fxge/win32/fx_win32_gdipext.cpp View 1 1 chunk +0 lines, -1 line 0 comments Download
M fpdfsdk/src/fpdfoom.cpp View 1 chunk +1 line, -1 line 0 comments Download
M fpdfsdk/src/fpdfview.cpp View 3 chunks +1 line, -7 lines 0 comments Download
M pdfium.gyp View 2 chunks +0 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Bo Xu
We have replaced the custom memory manager with system memory manager. Please review.
6 years, 5 months ago (2014-07-04 18:55:23 UTC) #1
palmer
https://codereview.chromium.org/372473003/diff/1/core/include/fxcrt/fx_memory.h File core/include/fxcrt/fx_memory.h (right): https://codereview.chromium.org/372473003/diff/1/core/include/fxcrt/fx_memory.h#newcode15 core/include/fxcrt/fx_memory.h:15: #define FX_Alloc(type, size) (type*)malloc(sizeof(type) * (size)) This and line ...
6 years, 5 months ago (2014-07-07 18:54:09 UTC) #2
palmer
Thank you for doing this! There are a few places where you need to handle ...
6 years, 5 months ago (2014-07-07 19:17:54 UTC) #3
Bo Xu
Looks like most of the issues here are related to over flow in FX_Alloc. We ...
6 years, 5 months ago (2014-07-08 02:54:29 UTC) #4
Bo Xu
https://codereview.chromium.org/372473003/diff/1/core/include/fxcrt/fx_memory.h File core/include/fxcrt/fx_memory.h (right): https://codereview.chromium.org/372473003/diff/1/core/include/fxcrt/fx_memory.h#newcode15 core/include/fxcrt/fx_memory.h:15: #define FX_Alloc(type, size) (type*)malloc(sizeof(type) * (size)) Do you suggest ...
6 years, 5 months ago (2014-07-08 19:22:16 UTC) #5
Bo Xu
https://codereview.chromium.org/372473003/diff/1/core/src/fxcrt/fx_basic_array.cpp File core/src/fxcrt/fx_basic_array.cpp (right): https://codereview.chromium.org/372473003/diff/1/core/src/fxcrt/fx_basic_array.cpp#newcode72 core/src/fxcrt/fx_basic_array.cpp:72: FXSYS_memset32(pNewData + m_nSize * m_nUnitSize, 0, (nNewMax - m_nSize) ...
6 years, 5 months ago (2014-07-08 19:31:25 UTC) #6
palmer
> Looks like most of the issues here are related to over flow in FX_Alloc. ...
6 years, 5 months ago (2014-07-08 22:13:13 UTC) #7
palmer
https://codereview.chromium.org/372473003/diff/1/core/src/fxcrt/fx_basic_array.cpp File core/src/fxcrt/fx_basic_array.cpp (right): https://codereview.chromium.org/372473003/diff/1/core/src/fxcrt/fx_basic_array.cpp#newcode72 core/src/fxcrt/fx_basic_array.cpp:72: FXSYS_memset32(pNewData + m_nSize * m_nUnitSize, 0, (nNewMax - m_nSize) ...
6 years, 5 months ago (2014-07-08 22:24:13 UTC) #8
palmer
I propose we get this patch in, and then deal with any remaining overflow concerns ...
6 years, 5 months ago (2014-07-08 22:24:48 UTC) #9
Bo Xu
Committed patchset #2 manually as r3522876 (presubmit successful).
6 years, 5 months ago (2014-07-08 22:30:52 UTC) #10
Bo Xu
6 years, 5 months ago (2014-07-08 22:32:15 UTC) #11
Message was sent while issue was closed.
On 2014/07/08 22:24:48, Chromium Palmer wrote:
> I propose we get this patch in, and then deal with any remaining overflow
> concerns in a later patch. LGTM.

Patch landed.

Powered by Google App Engine
This is Rietveld 408576698