mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Squash: Fix bugs
This commit is contained in:
parent
10d188faab
commit
716e578a19
382 changed files with 170096 additions and 220 deletions
|
@ -4,9 +4,9 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
/**
|
||||
@see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html
|
||||
@see: https://gperftools.github.io/gperftools/heap_checker.html
|
||||
config srs with gperf(to make gperftools):
|
||||
./configure --with-gperf --jobs=3
|
||||
./configure --gperf=on --jobs=3
|
||||
set the pprof path if not set:
|
||||
export PPROF_PATH=`pwd`/../../../objs/pprof
|
||||
to check mem leak:
|
||||
|
@ -17,6 +17,8 @@ to check mem leak:
|
|||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <gperftools/profiler.h>
|
||||
|
||||
void explicit_leak_imp() {
|
||||
printf("func leak: do something...\n");
|
||||
for (int i = 0; i < 1024; ++i) {
|
||||
|
@ -63,7 +65,7 @@ int main(int argc, char** argv) {
|
|||
if (!loop) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue