Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
merraksh
on Jan 1, 2014
|
parent
|
context
|
favorite
| on:
The Lost Art of C Structure Packing
I would assume you can't safely do arithmetic within a structure, for instance. As an example, take a
struct { char a; char b; char c; char *p; char d; }
A valgrind error that points at "0 bytes within an area of memory..." would signal an error originating somewhere in the struct, but who knows whether it's p or a.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: