libnetconf2 icon indicating copy to clipboard operation
libnetconf2 copied to clipboard

"ps aux" shows libnetconf2 example "server.c" occupied a lot memory after sending a big edit-config RPC (RPC size 60M+)

Open acidrainspace opened this issue 5 months ago • 1 comments

edit-config RPC already replied successfully by "server.c"

  1. "ps aux" show this "server.c" NETCONF server occupied more than 600M+ memory , not freed
  2. But repeatedly sending the same big edit-config RPC several time, the memory occupied not increased anymore

RPC attached: 50000-instances.zip

acidrainspace avatar Jul 24 '25 07:07 acidrainspace

I am not completely sure what the issue is. Run the server with valgrind, if no leaks are reported, it works properly. Maybe ps shows even freed memory, I am not sure what exactly malloc() and free() do. It may be possible the freed memory is not returned to the system but kept expecting more memory allocations, which would explain what you are seeing.

michalvasko avatar Jul 25 '25 08:07 michalvasko