Hi there,
I was testing gRPC for inter process communication. I used the helloWorld example as a test case on Windows using VS 2013 Express. The helloWorld sever code remains unchanged. The Original .proto file were used as well.
Here's my modification(bolded) to the main function in the original helloWorld client.
int main(int argc, char** argv) {
GreeterClient greeter(
grpc::CreateChannel("localhost:50051", grpc::InsecureCredentials(),
ChannelArguments()));
std::string user("world");
for (int i = 0; i < 100000; ++i)
{
std::string reply = greeter.SayHello(user);
std::cout << "Greeter received: " << reply << std::endl;
}
return 0;
}
Basically I am sending request at a very high frequency. I then used windows task manager to monitor my physical memory usage, and I can see that the memory used were increasing linearly with time. And half of those used memory is freeed when I close my client process, the other half is freed when I closed my sever process.
My question is, Am I using gRPC correctly? Is there a way to free those memories? Is it a memory leak or whatever?
Thanks in advance!
Best,
HYu