2 ms·
> That's exactly the same as my intrusive structure, no? It's not, for the reason they put in parentheses: > note: no pointers in user_data_t An allocation o
by Zambyte 2y ago
> That's exactly the same as my intrusive structure, no?
It's not, for the reason they put in parentheses:
> note: no pointers in user_data_t
An allocation of user_data_t also allocates space for payload_t, rather than just allocating space for a pointer to payload_t. Your structure requires an additional allocation to point the payload_t* at something. The fact that they hid the next node_t* in a struct doesn't matter though.
- lelanthran 2y ago> It's not, for the reason they put in parentheses: >> note: no pointers in user_data_t I feel like I am taking crazy pills: where, in my intrusive example, are pointers in the `user_data_t`? My intrusive code sample had no pointers for the user_data_t. It's exactly the same as GP's intrusive example.
- Zambyte 2y agoIt is not you that is crazy, I have been exhausted. My bad.