Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2015-06-08 09:47:45 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
573495a19f1c3ce2a98fc348f42f45b3b6efee6d
573495a1
1 parent
ca535fdb
refine the memory watcher.
显示空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
13 行增加
和
2 行删除
trunk/src/app/srs_app_source.cpp
trunk/src/core/srs_core_mem_watch.cpp
trunk/src/core/srs_core_performance.hpp
trunk/src/main/srs_main_server.cpp
trunk/src/app/srs_app_source.cpp
查看文件 @
573495a
...
...
@@ -961,6 +961,12 @@ void SrsSource::dispose()
hls
->
dispose
();
#endif
// cleaup the cached packets.
srs_freep
(
cache_metadata
);
srs_freep
(
cache_sh_video
);
srs_freep
(
cache_sh_audio
);
// cleanup the gop cache.
gop_cache
->
dispose
();
}
...
...
trunk/src/core/srs_core_mem_watch.cpp
查看文件 @
573495a
...
...
@@ -74,7 +74,7 @@ void srs_memory_report()
std
::
map
<
void
*
,
SrsMemoryObject
*>::
iterator
it
;
for
(
it
=
_srs_ptrs
.
begin
();
it
!=
_srs_ptrs
.
end
();
++
it
)
{
SrsMemoryObject
*
obj
=
it
->
second
;
printf
(
" %s: %#"
PRIx64
", %d
KB
\n
"
,
obj
->
category
.
c_str
(),
(
int64_t
)
obj
->
ptr
,
obj
->
size
/
1000
);
printf
(
" %s: %#"
PRIx64
", %d
B
\n
"
,
obj
->
category
.
c_str
(),
(
int64_t
)
obj
->
ptr
,
obj
->
size
);
total
+=
obj
->
size
;
}
...
...
trunk/src/core/srs_core_performance.hpp
查看文件 @
573495a
...
...
@@ -192,8 +192,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* whether enable the special memory watcher.
* which used for memory leak debug and hurts performance.
*/
#undef SRS_MEM_WATCH
#define SRS_MEM_WATCH
#undef SRS_MEM_WATCH
#endif
...
...
trunk/src/main/srs_main_server.cpp
查看文件 @
573495a
...
...
@@ -212,6 +212,11 @@ void check_macro_features()
srs_warn
(
"SRS %s is not stable, please use stable branch %s instead"
,
RTMP_SIG_SRS_VERSION
,
VERSION_STABLE_BRANCH
);
#endif
#ifdef SRS_MEM_WATCH
#warning "srs memory watcher will hurts performance. user should kill by SIGTERM or init.d script."
srs_warn
(
"srs memory watcher will hurts performance. user should kill by SIGTERM or init.d script."
);
#endif
#if defined(SRS_AUTO_STREAM_CASTER)
#warning "stream caster is experiment feature."
srs_warn
(
"stream caster is experiment feature."
);
...
...
请
注册
或
登录
后发表评论