Viewing profile — kkdwivedi
kkdwivedi
HN member- Joined
- Thu, Feb 28, 2019, 12:25 PM UTC
- HN karma
- 2
- Public activity
- 2 items
- HN profile
- View on Hacker News ↗
About kkdwivedi
No profile information was provided.
Recent public activity
-
comment
Comment #22871965
Right, totally depends on what you're doing. My example is not a good fit for intrusive use cases.
-
comment
Comment #22871107
Another option is a struct with a FAM at the end. typedef struct { size_t len; uint8_t data[]; } ByteBuf; Then, allocation becomes ByteBuf *b = malloc(sizeof(*b) + sizeof(uint8_t) …