So can I query the malloc package to find out how big an allocated block is?

Q

So can I query the malloc package to find out how big an allocated block is?

✍: Guest

A

Unfortunately, there is no standard or portable way. (Some compilers provide nonstandard extensions.) If you need to know, you'll have to keep track of it yourself.

2016-03-24, 1297👍, 0💬