-
-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
calling juice_send ,the memory leak is very fast #162
Comments
This is very surprising as I'm quite sure there is no memory allocation when sending. What is the embedded ARM platform? Are you sure the leak is inside the send function and with the calling code? Could you run valgrind or a similar tool to locate it? |
Using Cortex-A55, linux4.1.9, In the case of a memory leak, the length of the sent data print is not normal: Not sure what length 32 means
|
The system rootfs has valgrind enabled. According to the normal operation of the project, no leaked information is printed, but the vmRSS memory regularly increases by 264kb, which is very strange! |
What do you mean? If TURN relaying is not involved, it should send a datagram the same size as specified when calling
If you send at a rate too high for the network interface, datagrams will be buffered up to 1MB, but that should be kernel memory not counted in vmRSS. Do you use a custom socket implementation by any chance? |
I'm sorry, I also tested it according to which method, but it didn't work. On this basis, I also found a very strange problem. 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 2M. In the same situation, I just implement the C function interface call, and the g++ compile and run memory is only 1M. 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
|
If there is a memory leak in the library, valgrind must be able to report it. You could also use |
That problem has been solved. If appropriate, I will implement a set of business logic in C language. |
Calling juice_send, on linux such as Ubuntu on the X86 platform, there is no problem, there is no memory leak.
But when calling juice_send on an embedded platform like arm, the memory leak is very fast,Increase memory by 264kb every 1S to 3S.
At present, I want to fix this problem, can you please give some directions for exclusion?
If the network does not go to relay mode in the end, then I looked at the code, mainly sendto, but sendto causes leakage, I think it is unlikely, whether it is necessary to release the incoming data additionally
The text was updated successfully, but these errors were encountered: