OSDN Git Service

Small refactor.
authorChristopher Ferris <cferris@google.com>
Fri, 8 Apr 2016 00:14:53 +0000 (17:14 -0700)
committerChristopher Ferris <cferris@google.com>
Tue, 12 Apr 2016 22:36:53 +0000 (15:36 -0700)
commit55a89a48f41da349735627c2ae8985895955b1ca
treec946bd9b7e1353787f278e5face49cae5d8f238d
parent03a16d3db7c5fff733d28250212821ec2ff5eccd
Small refactor.

- Move all ScopedDisableDebugCalls into the debug_XXX calls. This avoids
any issues that might arise where every part of the code needs to properly
guard anything that might allocate. Instead everything is already guarded.
- Add a pointer to debug_data in all of the XXData classes. This avoids
calling individual functions passing in the debug_data pointer.
- Flip the NO_HEADER_OPTIONS to an explicit HEADER_OPTIONS list since fewer
options actually require a header.
- Move the extern of g_debug to the DebugData.h header.

Change-Id: Ia213a391b4a44d9ce122a709d09fe4f1b5426f36
14 files changed:
libc/malloc_debug/BacktraceData.cpp
libc/malloc_debug/BacktraceData.h
libc/malloc_debug/Config.h
libc/malloc_debug/DebugData.cpp
libc/malloc_debug/DebugData.h
libc/malloc_debug/FreeTrackData.cpp
libc/malloc_debug/FreeTrackData.h
libc/malloc_debug/GuardData.cpp
libc/malloc_debug/GuardData.h
libc/malloc_debug/OptionData.h [new file with mode: 0644]
libc/malloc_debug/TrackData.cpp
libc/malloc_debug/TrackData.h
libc/malloc_debug/debug_disable.cpp
libc/malloc_debug/malloc_debug.cpp