From xen-devel-bounces@lists.xen.org Thu Feb 18 18:17:50 2016 Received: (at maildrop) by bugs.xenproject.org; 18 Feb 2016 18:17:50 +0000 Received: from lists.xenproject.org ([50.57.142.19] helo=lists.xen.org) by bugs.xenproject.org with esmtp (Exim 4.80) (envelope-from ) id 1aWT9C-0000KC-GO for xen-devel-maildrop-Eithu9ie@bugs.xenproject.org; Thu, 18 Feb 2016 18:17:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aWT6v-0008JF-JL; Thu, 18 Feb 2016 18:15:29 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aWT6t-0008J8-Ic for xen-devel@lists.xen.org; Thu, 18 Feb 2016 18:15:27 +0000 Received: from [193.109.254.147] by server-16.bemta-14.messagelabs.com id E1/94-15991-E3A06C65; Thu, 18 Feb 2016 18:15:26 +0000 X-Env-Sender: prvs=849dfa6a4=Ian.Jackson@citrix.com X-Msg-Ref: server-2.tower-27.messagelabs.com!1455819324!22969219!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 57903 invoked from network); 18 Feb 2016 18:15:26 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-2.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 18 Feb 2016 18:15:26 -0000 X-IronPort-AV: E=Sophos;i="5.22,466,1449532800"; d="scan'208";a="339221423" From: Ian Jackson MIME-Version: 1.0 Message-ID: <22214.2619.86697.724156@mariner.uk.xensource.com> Date: Thu, 18 Feb 2016 18:15:23 +0000 To: Andrew Cooper Newsgroups: chiark.mail.xen.devel In-Reply-To: <564DAA8D.5060305@citrix.com> References: <564CC43B.1000904@ainfosec.com> <1447924858.5647.15.camel@citrix.com> <564DAA8D.5060305@citrix.com> X-Mailer: VM 8.1.0 under 23.4.1 (i486-pc-linux-gnu) X-DLP: MIA2 Cc: Martin Osterloh , Ian Campbell , "xen-devel@lists.xen.org" Subject: [Xen-devel] libxl and malloc failure (Re: Current LibXL Status) X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org Andrew Cooper writes ("Re: [Xen-devel] Current LibXL Status"): > There really is a show-stopper, which I have stated before. > > Languages such as OCaml use -ENOMEM as a hint to run the garbage > collector some more. I expect Haskell is the same. This cannot possibly be true (if what you mean is that they use ENOMEM[1] from malloc as such an indication). It would make it impossible to write a correct binding to a normal C library. Typically C library which calls malloc will do so in the middle of its execution. Even if the library returns the resulting error up as a distinguishable error code, you can't just make the same library call again - it may have done half its work but not the other half. So I think you must be wrong. Ian. [1] NB that when malloc fails there is no -ENOMEM, only ENOMEM. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel