Return-Path: X-Original-To: apmail-incubator-etch-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-etch-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4810179A4 for ; Mon, 12 Sep 2011 21:20:33 +0000 (UTC) Received: (qmail 89241 invoked by uid 500); 12 Sep 2011 21:20:33 -0000 Delivered-To: apmail-incubator-etch-dev-archive@incubator.apache.org Received: (qmail 89184 invoked by uid 500); 12 Sep 2011 21:20:32 -0000 Mailing-List: contact etch-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: etch-dev@incubator.apache.org Delivered-To: mailing list etch-dev@incubator.apache.org Received: (qmail 89176 invoked by uid 99); 12 Sep 2011 21:20:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Sep 2011 21:20:32 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ThomasMarsh@gamestop.com designates 12.25.107.28 as permitted sender) Received: from [12.25.107.28] (HELO GSIRONPORTA.gamestop.com) (12.25.107.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Sep 2011 21:20:24 +0000 X-IronPort-AV: E=Sophos;i="4.68,370,1312174800"; d="scan'208,217";a="43192648" Received: from unknown (HELO GV1HQPEX01.babgsetc.pvt) ([172.22.1.244]) by GSIRONPORTA.gamestop.com with ESMTP; 12 Sep 2011 16:20:03 -0500 Received: from GV1HQPEX03.babgsetc.pvt ([169.254.1.167]) by GV1HQPEX01.babgsetc.pvt ([172.22.1.191]) with mapi id 14.01.0323.002; Mon, 12 Sep 2011 16:19:46 -0500 From: Thomas Marsh To: "etch-dev@incubator.apache.org" Subject: Etch/C Memory Consumption Thread-Topic: Etch/C Memory Consumption Thread-Index: AcxxivBi5BxEJeFwTuaXOAvn2ve90g== Date: Mon, 12 Sep 2011 21:19:46 +0000 Message-ID: <9711F93A3E3A3C458276A476FFA91AECC22BAF@GV1HQPEX03.babgsetc.pvt> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.22.1.244] Content-Type: multipart/alternative; boundary="_000_9711F93A3E3A3C458276A476FFA91AECC22BAFGV1HQPEX03babgset_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_9711F93A3E3A3C458276A476FFA91AECC22BAFGV1HQPEX03babgset_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello all, I have a question about memory consumption in the Etch/C runtime based on b= ehavior we are seeing within our C client. I have modified the C implementa= tion 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 =3D new_helloworld_user(); user->id =3D 5; user->name =3D new_stringw(L"User"); result =3D remote->say_hello(remote, user); if (is_etch_exception(result)) { ... } printf("%S\n", result->v.valw); etch_object_destroy(result); } ... While running this, I see that the memory consumption of the client continu= ally grows. (In this example, it grows by about 1 mB every 5 seconds.) I ca= nnot see the memory leak when testing with valgrind, so it would suggest th= at the leak is in Etch managed memory which is cleared at exit. My understanding is that the call to remote->say_hello() should delegate re= sponsibility of deallocation of the parameters to the Etch runtime, and tha= t the client code is only responsible for deallocating the result object. T= he memory use should be stable within this tight loop. Can anyone comment o= n the potential cause of the memory consumption? Thanks, and best regards, --thomas --_000_9711F93A3E3A3C458276A476FFA91AECC22BAFGV1HQPEX03babgset_--