Skip to content

Commit

Permalink
Update doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Aug 21, 2024
1 parent b9c2a2c commit f32a1e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ valgrind --leak-check=full --show-leak-kinds=all ./objs/srs -c conf/console.conf

> Remark: For ST to support valgrind, see [state-threads](https://github.com/ossrs/state-threads#usage) and [ST#2](https://github.com/ossrs/state-threads/issues/2).
> Remark: For HTTP valgrind API, you should upgrade your SRS to required version, see [#4149](https://github.com/ossrs/srs/pull/4149).
To use Valgrind to detect memory leaks in SRS, even though Valgrind hooks are supported in ST, there are
still many false positives. A more reasonable approach is to have Valgrind report incremental memory leaks.
This way, global and static variables can be avoided, and detection can be achieved without exiting the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ valgrind --leak-check=full --show-leak-kinds=all ./objs/srs -c conf/console.conf

> Remark: SRS3之前的版本,可以手动给ST打PATCH支持VALGRIND,参考[state-threads](https://github.com/ossrs/state-threads#usage),详细的信息可以参考[ST#2](https://github.com/ossrs/state-threads/issues/2)
> Remark: SRS需要升级到对应版本,才能支持HTTP valgrind API,具体参考 [#4149](https://github.com/ossrs/srs/pull/4149)
使用valgrind检测SRS内存泄露时,尽管在ST中支持了valgrind的hook,还是有大量的误报信息。比较合理的是让valgrind报告增量的内存泄露,
这样可以避开全局和静态变量,也可以不用退出程序就可以实现检测。操作步骤如下:

Expand Down

0 comments on commit f32a1e5

Please sign in to comment.