How Memory Is Allocated and Deallocated
By default, stub code generated by the MIDL compiler calls user-supplied functions to allocate and free memory. These functions, named midl_user_allocate and midl_user_free, must be supplied by the developer and linked with the application.
All applications must supply implementations of midl_user_allocate and midl_user_free, even though the names of these functions may not appear explicitly in the stubs. The only exception is when you are compiling in OSF-compatibility (/osf) mode. These user-supplied functions must match a specific, defined function prototype but otherwise, can be implemented in any way that is convenient or useful for the application. Alternatively, applications can use the RpcSs Memory Management Package. The Microsoft RPC run-time library supplies this group of functions.
The following sections describe the RPC memory management functions.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for