Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
spaetzleesser
on Nov 23, 2020
|
parent
|
context
|
favorite
| on:
“To be safe allocate 5 bytes more than you need”
Wouldn’t you wrap the allocation with an alloc/free function that does the allocation with whatever extra bytes that are needed? Letting the API users deal with such details seems a recipe for disaster.
zelly
on Nov 23, 2020
[–]
Because then you're forcing clients to use malloc rather than their own allocator
spaetzleesser
on Nov 24, 2020
|
parent
[–]
Good point
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: