My situation is just the same as you! And now i am nearly sure that the function rp_ack_fully_decode_service_request is bad for the memory, because i wrote a small code-block to test, and the result is not so good!(after about half an hour my arm9 meet the OOM killer.)
Now i rewrite the function rp_ack_print_data() for my ReadProperty service, and everything goes well.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just simply rewrite the function rp_ack_print_data(BACNET_READ_PROPERTY_DATA * data) from h_rp_a.c, and replace the print_data (in bacrp) using the function rp_ack_kk_data(BACNET_READ_PROPERTY_DATA * data, BACNET_OBJECT_PROPERTY_VALUE * object_value).
thx for your job
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Has anyone else experienced a memory leak in the function:
rp_ack_fully_decode_service_request ?
It is in: h_rp_a.c
I've used valgrind to pinpoint it and its coming from the following calloc
call:
rp1_property = calloc(1, sizeof (BACNET_PROPERTY_REFERENCE));
I set a trap at the end of the function to call "free" if rp1_property is not
NULL.
Valgrind then complains about another leak at for the following line:
value = calloc(1, sizeof (BACNET_APPLICATION_DATA_VALUE));
Using the same trapping approach at the end of this function doesn't work for
that leak.
Any others experienced the same problem?
Thanks.
My situation is just the same as you! And now i am nearly sure that the function rp_ack_fully_decode_service_request is bad for the memory, because i wrote a small code-block to test, and the result is not so good!(after about half an hour my arm9 meet the OOM killer.)
Now i rewrite the function rp_ack_print_data() for my ReadProperty service, and everything goes well.
I'd be happy to patch that handler code if you are interested in sharing your fixes.
Hello Steve,
I just simply rewrite the function rp_ack_print_data(BACNET_READ_PROPERTY_DATA * data) from h_rp_a.c, and replace the print_data (in bacrp) using the function rp_ack_kk_data(BACNET_READ_PROPERTY_DATA * data, BACNET_OBJECT_PROPERTY_VALUE * object_value).
thx for your job