let packets[5].pkt_data is 0X5646, the consumer didnt fetch the data in it. And it dint be freed. and now it will be rewrite, since the producer call malloc() again. Then packet[5].pkt_data equals to 0X5896.
What will happen in memory 0X5646?
Printable View
let packets[5].pkt_data is 0X5646, the consumer didnt fetch the data in it. And it dint be freed. and now it will be rewrite, since the producer call malloc() again. Then packet[5].pkt_data equals to 0X5896.
What will happen in memory 0X5646?
I dont care that the data is lost, I just worry about the memory errors and the performance things. I am starting in this, and I dont know when will the error occur.
yes, ur right. thx again anduril462.