Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've never quite understood this one.

For example-- what happens if I create an array of foos and then malloc data of each element to some arbitrary size?



You don't do that. Each one is usually allocated on its own, and you keep a pointer to each. Though you could store them contiguously if each contains a length member or they're delimited in some other way.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: