From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 7E9507EE6B for ; Mon, 25 Nov 2013 14:01:16 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of goswin-v-b@web.de) identity=pra; client-ip=212.227.17.12; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of goswin-v-b@web.de) identity=mailfrom; client-ip=212.227.17.12; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.web.de) identity=helo; client-ip=212.227.17.12; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="postmaster@mout.web.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjwCAGNJk1LU4xEMnGdsb2JhbABZumuFToErFg4BAQEBAQYNCQkUKIIlAQEFOj8QCxEEAQEBCSUPBSgNAQUOE4duARa1Cx+IRRePBweDIIETA5gThi4Sjnw X-IPAS-Result: AjwCAGNJk1LU4xEMnGdsb2JhbABZumuFToErFg4BAQEBAQYNCQkUKIIlAQEFOj8QCxEEAQEBCSUPBSgNAQUOE4duARa1Cx+IRRePBweDIIETA5gThi4Sjnw X-IronPort-AV: E=Sophos;i="4.93,768,1378850400"; d="scan'208";a="45230484" Received: from mout.web.de ([212.227.17.12]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 25 Nov 2013 14:01:16 +0100 Received: from frosties.localnet ([37.49.32.119]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0M09ZI-1VWhHz0Ysm-00uMx8 for ; Mon, 25 Nov 2013 14:01:15 +0100 Received: from mrvn by frosties.localnet with local (Exim 4.80) (envelope-from ) id 1Vkvmq-0001f7-1b; Mon, 25 Nov 2013 14:01:12 +0100 Date: Mon, 25 Nov 2013 14:01:11 +0100 From: Goswin von Brederlow To: Adrien Nader Cc: Amogh Margoor , "caml-list@inria.fr" Message-ID: <20131125130111.GC3610@frosties> References: <20131120205611.GA15056@notk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131120205611.GA15056@notk.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Provags-ID: V03:K0:SyzbfOQvTDFffuO6iVR+V1e0ONoxoo0VDZLyrMezN8dlryyH+5H EKMDW9jzect5II4z9rGo84i7uI0p9BbtiHEURYbZCC93a0k10rP0txg1XTnd1evJvQ/lkfM u9yCkcbwZzAsjmLpDq12wBVPAhaWP94ZkIszy+95aD4/rFLKuMO2af/SZQS7NmiglgGxnhs +XDvTFya5AL4jiucRk0gw== Subject: Re: [Caml-list] Ocaml crash in windows due to running out of memory On Wed, Nov 20, 2013 at 09:56:11PM +0100, Adrien Nader wrote: > Hi, > > On Wed, Nov 20, 2013, Amogh Margoor wrote: > > Hi, > > The Ocaml version I am facing problem with is 3.12.1. > > Regards, > > Amogh > > > > From: Amogh Margoor > > Sent: Wednesday, November 20, 2013 4:19 PM > > To: 'caml-list@inria.fr' > > Subject: Ocaml crash in windows due to running out of memory > > > > Hi, > > We have memory intensive application coded in Ocaml, which crashes on Windows 7 when it runs out of memory instead of throwing an exception. > > Is that a known issue ? > > What is the exception and how much memory is your application using at > that moment? Many kernels only allocate address space on malloc() and assign pages only on use. They also support over commit of memory. Meaning applications can allocate more memory than the system has under the assumption that they won't actually use it all (or that maybe some memory will be freed before the apps actually use the memory). Due to that in many kernels malloc() basically never fails but when you use the memory and the kernel can't find any page to assign to it you get a segfault and your program crashes. You only get the exception if the malloc() fails. Now I'm not sure how windows actualy handles this but it sounds like it allows over commit. MfG Goswin