Wrapper for memory allocations required by RCP API.
This function must be implemented by the client code. In most cases this can simply be implemented as such: