Disassemble the analysis layer by layer The innermost __f is a function pointer, its parameter is void, and the return value is void. Then __set_malloc_handler is relatively easy to confuse. First of all, it is a function (I said it wrong at first, not a pointer). Its parameters are function pointers in the shape of __f, and its return value is a pointer. The type of this pointer is void. (*)() The usage should be as follows:
Disassemble the analysis layer by layer
The innermost
__f
is a function pointer, its parameter is void, and the return value is void.Then
__set_malloc_handler
is relatively easy to confuse. First of all, it is a function (I said it wrong at first, not a pointer). Its parameters are function pointers in the shape of__f
, and its return value is a pointer. The type of this pointer is void. (*)()The usage should be as follows: