Menu

#43 Usage of memset() in the trdp_pdReceive() function

1.2.0.0
closed
None
2014-07-14
2014-06-02
Gari
No

memset(pNewFrame, 0, TRDP_MAX_PD_PACKET_SIZE); (Function trdp_pdReceive())

In order to receive the messages, the pNewFrame buffer is cleaned in each call to the trdp_pdReceive() function, with the TRDP_MAX_PD_PACKET_SIZE. This is not necessary, because with the recSize parameter is controlled the quantity of data that is stored in the buffer (maybe would be interesting to keep this only in the case of Debug, to check the memory status). The CPU load will be more efficient with this change.

Discussion

  • Bernd Löhr

    Bernd Löhr - 2014-07-14
    • status: open --> accepted
    • assigned_to: Gari --> Bernd Löhr
     
  • Bernd Löhr

    Bernd Löhr - 2014-07-14
    • status: accepted --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB