I am debugging a program with gdb and I have a ptr to memory allocated using malloc. It is dynamically allocatted based off of some math so it would be useful to be able to type into gdb a command and specify the ptr, and be able to get back the exact actual size of memory allocated. Is this possible? Are there any alternative methods? I'm just trying to debug and make sure my math isn't off at runtime.
Thanks.