diff options
author | Christopher Ferris <cferris@google.com> | 2016-02-22 19:23:26 -0800 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2016-02-26 17:02:17 -0800 |
commit | 549e52200b6af3c33cba7ef759ea98b49fa40082 (patch) | |
tree | bf86a923f9e99668414f03f47b41f5493ef33072 /libc/malloc_debug/tests/malloc_debug_config_tests.cpp | |
parent | eb727252f22bd533ebfd40637c0718fdc9946221 (diff) |
Move hard-coded values to constants.
Change all of the hard-coded config values to be defined constants.
Also make sure to use these constants in the usage output.
Bug: 26739265
Change-Id: I597a6d71279a2df9cc7e98c42ac70224261bac99
Diffstat (limited to 'libc/malloc_debug/tests/malloc_debug_config_tests.cpp')
-rw-r--r-- | libc/malloc_debug/tests/malloc_debug_config_tests.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/libc/malloc_debug/tests/malloc_debug_config_tests.cpp b/libc/malloc_debug/tests/malloc_debug_config_tests.cpp index b8535e180..a6cea98e9 100644 --- a/libc/malloc_debug/tests/malloc_debug_config_tests.cpp +++ b/libc/malloc_debug/tests/malloc_debug_config_tests.cpp @@ -51,28 +51,28 @@ std::string usage_string( "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.\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.\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.\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 The default is 16 frames.\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.\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 fill_on_alloc[=XX]\n" "6 malloc_debug On first allocation, fill with the value 0xeb.\n" @@ -92,7 +92,7 @@ std::string usage_string( "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.\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" @@ -101,14 +101,15 @@ std::string usage_string( "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.\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.\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" |