Find size of memory pointer is pointing to

Hi,
Can we find the size of memory a pointer is pointing to in LLVM. For example
type *p = (type *)malloc(sizeof(type)*20);
then it should give us size as sizeof(type) * 20.

Hi Sunil, you can do this using the routines in llvm/Analysis/MemoryBuiltins.h.

Ciao, Duncan.