The piece of code I attached is actually out from real context. The container is to be used in an embedded system. The sender allocates and the reseceiver frees the buffer. Now the whole buffer is allocated and freed only once instead of three times.
Hi,
Thanks for the tips. I now got the reason for the failure. I was a little bit "wooden eye" :).
I find it handy to have only one buffer and then just provide the corresponding struct to the counterpart
component to access to the data. One malloc and one free instead of several.
The...
Hi,
I'm having problems of accessing to continuous buffer with pointers in the struct. My purpose is to allocate
the continuous buffer and access to the buffer with the pointers in the struct.
So it seems that there is something wrong probably with getting the pointers to current_code_ptr
and...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.