etch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Marsh <>
Subject Etch/C Memory Consumption
Date Mon, 12 Sep 2011 21:19:46 GMT
Hello all,

I have a question about memory consumption in the Etch/C runtime based on behavior we are
seeing within our C client. I have modified the C implementation of the HelloWorld example
in the distribution to run an infinite loop of requests:

In the main() routine of helloworld_client_main.c:

                while (1) {
                                user = new_helloworld_user();
                                user->id = 5;
                                user->name = new_stringw(L"User");
                                result = remote->say_hello(remote, user);
                                if (is_etch_exception(result)) {
                                printf("%S\n", result->v.valw);

While running this, I see that the memory consumption of the client continually grows. (In
this example, it grows by about 1 mB every 5 seconds.) I cannot see the memory leak when testing
with valgrind, so it would suggest that the leak is in Etch managed memory which is cleared
at exit.

My understanding is that the call to remote->say_hello() should delegate responsibility
of deallocation of the parameters to the Etch runtime, and that the client code is only responsible
for deallocating the result object. The memory use should be stable within this tight loop.
Can anyone comment on the potential cause of the memory consumption?

Thanks, and best regards,


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message