You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This memory savings in embedded devices is very important, why is the memory gap so large.
Write a cpp file, compile the library with gcc, and then use a C++ class to call libjuice, use When g++ compiles and runs, the memory is 4M. In the same situation, I just implement the C function interface call, and the g++ compile and run memory is only 2.5M. Of course, the C++ class is the simplest structure, and there is no other processing. It seems that as long as any interface of the libjuice library is called by the C++ class, Memory immediately 2M VmRSS int main() { juice_set_log_level(JUICE_LOG_LEVEL_WARN); test_connectivity(); connectivity* conn = new connectivity(); conn->sendas(); while(true){ sleep(2); } return 0; }
The above codes are saved in .cpp and .c respectively, compiled and run, and it is very clear to view vmRSS.
The text was updated successfully, but these errors were encountered:
I don't think that this is related to libjuice. You should use a proper tool like valgrind --tool=massif to profile the heap usage, as you can't really study the memory behavior of a program by only looking at VmRSS.
This problem is different from the previous issue. In fact, you can quickly load the libjuice library and run the above code, and it is very clear to check the memory changes separately. This is not a memory leak problem.
There is this question mainly because of the use of c libraries such as srtp and usrsctp, there will be no such problems
This memory savings in embedded devices is very important, why is the memory gap so large.
Write a cpp file, compile the library with gcc, and then use a C++ class to call libjuice, use When g++ compiles and runs, the memory is 4M. In the same situation, I just implement the C function interface call, and the g++ compile and run memory is only 2.5M. Of course, the C++ class is the simplest structure, and there is no other processing. It seems that as long as any interface of the libjuice library is called by the C++ class, Memory immediately 2M VmRSS
int main() { juice_set_log_level(JUICE_LOG_LEVEL_WARN); test_connectivity(); connectivity* conn = new connectivity(); conn->sendas(); while(true){ sleep(2); } return 0; }
The above codes are saved in .cpp and .c respectively, compiled and run, and it is very clear to view vmRSS.
The text was updated successfully, but these errors were encountered: