I want to allocate a dynamic memory to a buffer, and I am storing the data in it through vsprintf();. I am creating a logging mechanism that requires the use of vsprintf and every time my data is different so I want to allocate dynamic memory to the buffer. But I don't know how I can get the size of the format and va_list args.
I have no clue from where I can start and how can I get the buffer length
Any help would be great.
Thank you!