1. A computer-implemented method for a remote procedure call (RPC) with call-by-reference semantics, comprising: establishing, by a processing device, a session between a client and a server; initializing a client session heap memory and a server session heap memory with a remote direct memory access (RDMA) provider; storing a parameter in the session heap memory of the client; passing a handle for the parameter to the server; and permitting access to the parameter responsive to an on-demand request from the server.