mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine the memory watcher.
This commit is contained in:
parent
ca535fdb93
commit
573495a19f
4 changed files with 13 additions and 2 deletions
|
@ -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", %dKB\n", obj->category.c_str(), (int64_t)obj->ptr, obj->size / 1000);
|
||||
printf(" %s: %#"PRIx64", %dB\n", obj->category.c_str(), (int64_t)obj->ptr, obj->size);
|
||||
total += obj->size;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue