mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
add warning for gmp, use gmc to detect memory leak.
This commit is contained in:
parent
f347099fd1
commit
7996b3b789
2 changed files with 7 additions and 2 deletions
|
@ -37,11 +37,11 @@ echo -e "\${GREEN}build summary:\${BLACK}"
|
|||
echo -e " \${BLACK}+------------------------------------------------------------------------------------\${BLACK}"
|
||||
echo -e " |${SrsGperfSummaryColor}gperf @see: https://github.com/simple-rtmp-server/srs/wiki/v1_CN_GPERF\${BLACK}"
|
||||
echo -e " | ${SrsGperfMCSummaryColor}gmc @see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html\${BLACK}"
|
||||
echo -e " | ${SrsGperfMCSummaryColor}gmc: gperf memory check\${BLACK}"
|
||||
echo -e " | ${SrsGperfMCSummaryColor}gmc: gperf memory check, or memory leak detect\${BLACK}"
|
||||
echo -e " | ${SrsGperfMCSummaryColor}env PPROF_PATH=./objs/pprof HEAPCHECK=normal ./objs/srs -c conf/console.conf # start gmc\${BLACK}"
|
||||
echo -e " | ${SrsGperfMCSummaryColor}killall -2 srs # or CTRL+C to stop gmc\${BLACK}"
|
||||
echo -e " | ${SrsGperfMPSummaryColor}gmp @see: http://google-perftools.googlecode.com/svn/trunk/doc/heapprofile.html\${BLACK}"
|
||||
echo -e " | ${SrsGperfMPSummaryColor}gmp: gperf memory profile\${BLACK}"
|
||||
echo -e " | ${SrsGperfMPSummaryColor}gmp: gperf memory profile, similar to gcp\${BLACK}"
|
||||
echo -e " | ${SrsGperfMPSummaryColor}rm -f gperf.srs.gmp*; ./objs/srs -c conf/console.conf # start gmp\${BLACK}"
|
||||
echo -e " | ${SrsGperfMPSummaryColor}killall -2 srs # or CTRL+C to stop gmp\${BLACK}"
|
||||
echo -e " | ${SrsGperfMPSummaryColor}./objs/pprof --text objs/srs gperf.srs.gmp* # to analysis memory profile\${BLACK}"
|
||||
|
|
|
@ -254,6 +254,11 @@ int main(int argc, char** argv)
|
|||
"it is not possible to run both the heap-checker and heap profiler at the same time");
|
||||
#endif
|
||||
|
||||
// never use gmp to check memory leak.
|
||||
#ifdef SRS_AUTO_GPERF_MP
|
||||
#warning "gmp is not used for memory leak, please use gmc instead."
|
||||
#endif
|
||||
|
||||
// never use srs log(srs_trace, srs_error, etc) before config parse the option,
|
||||
// which will load the log config and apply it.
|
||||
if ((ret = _srs_config->parse_options(argc, argv)) != ERROR_SUCCESS) {
|
||||
|
|
Loading…
Reference in a new issue