summaryrefslogtreecommitdiff
path: root/libc/malloc_debug/tests/malloc_debug_config_tests.cpp
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2018-05-25 12:46:55 -0700
committerChristopher Ferris <cferris@google.com>2018-05-25 13:28:05 -0700
commit770cbb35cf3441770ce8a808f864beb68b0091cb (patch)
tree172e8ed21d5c6027f93313bc65d9c4cb329b7e7e /libc/malloc_debug/tests/malloc_debug_config_tests.cpp
parent8aa6d67f2d48aa01f099a85adc432097a13172f1 (diff)
Point to online documentation.
Test: Unit tests pass. Change-Id: Ibbdc260bfdf6a6daf091c4a49cdf03e51f6ca6cf
Diffstat (limited to 'libc/malloc_debug/tests/malloc_debug_config_tests.cpp')
-rw-r--r--libc/malloc_debug/tests/malloc_debug_config_tests.cpp107
1 files changed, 2 insertions, 105 deletions
diff --git a/libc/malloc_debug/tests/malloc_debug_config_tests.cpp b/libc/malloc_debug/tests/malloc_debug_config_tests.cpp
index 2a6e39986..a083b4f05 100644
--- a/libc/malloc_debug/tests/malloc_debug_config_tests.cpp
+++ b/libc/malloc_debug/tests/malloc_debug_config_tests.cpp
@@ -40,111 +40,8 @@ class MallocDebugConfigTest : public ::testing::Test {
};
std::string usage_string(
- "6 malloc_debug malloc debug options usage:\n"
- "6 malloc_debug \n"
- "6 malloc_debug front_guard[=XX]\n"
- "6 malloc_debug Enables a front guard on all allocations. If XX is set\n"
- "6 malloc_debug it sets the number of bytes in the guard. The default is\n"
- "6 malloc_debug 32 bytes, the max bytes is 16384.\n"
- "6 malloc_debug \n"
- "6 malloc_debug rear_guard[=XX]\n"
- "6 malloc_debug Enables a rear guard on all allocations. If XX is set\n"
- "6 malloc_debug it sets the number of bytes in the guard. The default is\n"
- "6 malloc_debug 32 bytes, the max bytes is 16384.\n"
- "6 malloc_debug \n"
- "6 malloc_debug guard[=XX]\n"
- "6 malloc_debug Enables both a front guard and a rear guard on all allocations.\n"
- "6 malloc_debug If XX is set it sets the number of bytes in both guards.\n"
- "6 malloc_debug The default is 32 bytes, the max bytes is 16384.\n"
- "6 malloc_debug \n"
- "6 malloc_debug backtrace[=XX]\n"
- "6 malloc_debug Enable capturing the backtrace at the point of allocation.\n"
- "6 malloc_debug If XX is set it sets the number of backtrace frames.\n"
- "6 malloc_debug This option also enables dumping the backtrace heap data\n"
- "6 malloc_debug when a signal is received. The data is dumped to the file\n"
- "6 malloc_debug backtrace_dump_prefix.<PID>.txt.\n"
- "6 malloc_debug The default is 16 frames, the max number of frames is 256.\n"
- "6 malloc_debug \n"
- "6 malloc_debug backtrace_enable_on_signal[=XX]\n"
- "6 malloc_debug Enable capturing the backtrace at the point of allocation.\n"
- "6 malloc_debug The backtrace capture is not enabled until the process\n"
- "6 malloc_debug receives a signal. If XX is set it sets the number of backtrace\n"
- "6 malloc_debug frames. The default is 16 frames, the max number of frames is 256.\n"
- "6 malloc_debug \n"
- "6 malloc_debug backtrace_dump_prefix[=FILE]\n"
- "6 malloc_debug This option only has meaning if the backtrace option has been specified.\n"
- "6 malloc_debug This is the prefix of the name of the file to which backtrace heap\n"
- "6 malloc_debug data will be dumped. The file will be named backtrace_dump_prefix.<PID>.txt.\n"
- "6 malloc_debug The default is /data/local/tmp/backtrace_heap.\n"
- "6 malloc_debug \n"
- "6 malloc_debug backtrace_dump_on_exit\n"
- "6 malloc_debug This option only has meaning if the backtrace option has been specified.\n"
- "6 malloc_debug This will cause all live allocations to be dumped to the file\n"
- "6 malloc_debug backtrace_dump_prefix.<PID>.final.txt.\n"
- "6 malloc_debug The default is false.\n"
- "6 malloc_debug \n"
- "6 malloc_debug backtrace_full\n"
- "6 malloc_debug Any time a backtrace is acquired, use an unwinder that can\n"
- "6 malloc_debug display Java stack frames. This unwinder can run slower than\n"
- "6 malloc_debug normal unwinder.\n"
- "6 malloc_debug \n"
- "6 malloc_debug fill_on_alloc[=XX]\n"
- "6 malloc_debug On first allocation, fill with the value 0xeb.\n"
- "6 malloc_debug If XX is set it will only fill up to XX bytes of the\n"
- "6 malloc_debug allocation. The default is to fill the entire allocation.\n"
- "6 malloc_debug \n"
- "6 malloc_debug fill_on_free[=XX]\n"
- "6 malloc_debug On free, fill with the value 0xef. If XX is set it will\n"
- "6 malloc_debug only fill up to XX bytes of the allocation. The default is to\n"
- "6 malloc_debug fill the entire allocation.\n"
- "6 malloc_debug \n"
- "6 malloc_debug fill[=XX]\n"
- "6 malloc_debug On both first allocation free, fill with the value 0xeb on\n"
- "6 malloc_debug first allocation and the value 0xef. If XX is set, only fill\n"
- "6 malloc_debug up to XX bytes. The default is to fill the entire allocation.\n"
- "6 malloc_debug \n"
- "6 malloc_debug expand_alloc[=XX]\n"
- "6 malloc_debug Allocate an extra number of bytes for every allocation call.\n"
- "6 malloc_debug If XX is set, that is the number of bytes to expand the\n"
- "6 malloc_debug allocation by. The default is 16 bytes, the max bytes is 16384.\n"
- "6 malloc_debug \n"
- "6 malloc_debug free_track[=XX]\n"
- "6 malloc_debug When a pointer is freed, do not free the memory right away.\n"
- "6 malloc_debug Instead, keep XX of these allocations around and then verify\n"
- "6 malloc_debug that they have not been modified when the total number of freed\n"
- "6 malloc_debug allocations exceeds the XX amount. When the program terminates,\n"
- "6 malloc_debug the rest of these allocations are verified. When this option is\n"
- "6 malloc_debug enabled, it automatically records the backtrace at the time of the free.\n"
- "6 malloc_debug The default is to record 100 allocations, the max allocations\n"
- "6 malloc_debug to record is 16384.\n"
- "6 malloc_debug \n"
- "6 malloc_debug free_track_backtrace_num_frames[=XX]\n"
- "6 malloc_debug This option only has meaning if free_track is set. This indicates\n"
- "6 malloc_debug how many backtrace frames to capture when an allocation is freed.\n"
- "6 malloc_debug If XX is set, that is the number of frames to capture. If XX\n"
- "6 malloc_debug is set to zero, then no backtrace will be captured.\n"
- "6 malloc_debug The default is to record 16 frames, the max number of frames is 256.\n"
- "6 malloc_debug \n"
- "6 malloc_debug leak_track\n"
- "6 malloc_debug Enable the leak tracking of memory allocations.\n"
- "6 malloc_debug \n"
- "6 malloc_debug record_allocs[=XX]\n"
- "6 malloc_debug Record every single allocation/free call. When a specific signal\n"
- "6 malloc_debug is sent to the process, the contents of recording are written to\n"
- "6 malloc_debug a file (/data/local/tmp/record_allocs.txt) and the recording is cleared.\n"
- "6 malloc_debug If XX is set, that is the total number of allocations/frees that can\n"
- "6 malloc_debug recorded. of frames to capture. The default value is 8000000.\n"
- "6 malloc_debug If the allocation list fills up, all further allocations are not recorded.\n"
- "6 malloc_debug \n"
- "6 malloc_debug record_allocs_file[=FILE]\n"
- "6 malloc_debug This option only has meaning if the record_allocs options has been specified.\n"
- "6 malloc_debug This is the name of the file to which recording information will be dumped.\n"
- "6 malloc_debug The default is /data/local/tmp/record_allocs.txt.\n"
- "6 malloc_debug \n"
- "6 malloc_debug verify_pointers\n"
- "6 malloc_debug A lightweight way to verify that free/malloc_usable_size/realloc\n"
- "6 malloc_debug are passed valid pointers.\n"
-);
+ "6 malloc_debug For malloc debug option descriptions go to:\n"
+ "6 malloc_debug https://android.googlesource.com/platform/bionic/+/master/libc/malloc_debug/README.md\n");
TEST_F(MallocDebugConfigTest, unknown_option) {