Re:Reading the NSA’s codebase: LemonGraph review
by kevin_thibedeau on Friday August 10, 2018 @03:03PM
(#17735934)
You just feed sizeof the instance of the object you're allocating memory for. That entails funky pseudo-dereferences for pointers so the compiler doesn't give you the size of a pointer. It will look up the object's type and requisite size to fill in the argument to malloc(). If the object in question has an unknown type (maybe all you've got is a void *) then you will have to provide the size by other means.
[ Parent
| on HN ]
There are no comments on this comment yet.