The Wayback Machine - https://web.archive.org/web/20161214173213/http://c-faq.com:80/malloc/sizeof.html
prev up next   top/contents search

comp.lang.c FAQ list · Question 7.28

Q: Why doesn't sizeof tell me the size of the block of memory pointed to by a pointer?


A: sizeof tells you the size of the pointer. There is no portable way to find out the size of a malloc'ed block. (Remember, too, that sizeof operates at compile time, and see also question 7.27.)


prev up next   contents search
about this FAQ list   about eskimo   search   feedback   copyright

Hosted by Eskimo North

Morty Proxy This is a proxified and sanitized view of the page, visit original site.