Use error-checking versions of memory-related functions in the client.