Im trying to implement a callback and need to do a malloc every time the callback happens .. does VDK support malloc in Callbacks?? .. if it doesnt is there an alternative to malloc ,..?
I assume you are referring to SSL callbacks in your question. Please be aware that SSL callbacks run at what, in VDK, we call either interrupt level (live callbacks) or kernel level (deferred callbacks). This means that the VDK APIS that can be called in a callback are the ones that can be used from the relevant level. To see a list of the different levels that APIs can be called from look at the "VDK API Validity" section of the Manual. Calling a VDK API from kernel/interrupt level will result in a kernel panic if the API is not valid at those levels.
Malloc and free are not interrupt safe routines as, in order to protect the heap structure, malloc and free use Push/PopUnscheduledRegion. As you can see in the VDK API validity table neither of these APIs are valid from either kernel or interrupt levels and their use will result in a KernelPanic.
Retrieving data ...