From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14284 invoked by alias); 17 Jun 2004 09:08:33 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 14275 invoked from network); 17 Jun 2004 09:08:32 -0000 Received: from unknown (HELO main.gmane.org) (80.91.224.249) by sourceware.org with SMTP; 17 Jun 2004 09:08:32 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1Bassp-00078o-00 for ; Thu, 17 Jun 2004 11:08:31 +0200 Received: from 62.24.130.166 ([62.24.130.166]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Jun 2004 11:08:31 +0200 Received: from klawson by 62.24.130.166 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Jun 2004 11:08:31 +0200 To: ecos-discuss@sources.redhat.com From: Kelvin Lawson Date: Thu, 17 Jun 2004 09:08:00 -0000 Message-ID: <40D15F26.9050206@ad-holdings.co.uk> References: <1087322512.28254.ezmlm@ecos.sourceware.org> <1087388654.29814.14.camel@famine> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 62.24.130.166 User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) In-Reply-To: <1087388654.29814.14.camel@famine> Subject: [ECOS] Re: Problems with ppp and Windows X-SW-Source: 2004-06/txt/msg00159.txt.bz2 Hi Øyvind, > Ah! progress! Excellent! > - eCos could be a bit more friendly with the developer when running out of memory. Perhaps > there are suitable facilities for detecting these situations. > In addition to the suggestions you made, perhaps it would be a good idea to add a fn that > is invoked by the memory allocator when running out of memory? By default this could be > an empty fn(handy breakpoint site), and the application could override it with something > else(e.g. reset the board, invoke debugger, etc.). Yes, sounds fine. In my case I'd be happy with just a debug message or assert in cyg_net_malloc() when not enough memory is available. I would think this should be a build option, rather than a default operation. I think the proper place to add some debug notification is at the usage points of network mallocs. In the case of PPP, after the MALLOC() failed, it ought to have done something about it or printed some debug, rather than just carrying on broken. > - reduce memory requirements for PPP and freebsd networking stack. For PPP there are a bunch of configuration options that aren't covered by the cyg_ppp_options_t structure. I've added a few options here to handle authorisation for dialin connections. Similarly you could extend it to disable things like VJ compression to reduce the memory requirements. > - It is a bit hard to *know* how much memory is required. It would be nice to have a simple > way of figuring this out at compile time. Difficult to gauge in advance I would think. Perhaps someone could comment on where the default calculation comes from (256*1024)+(MAXSOCKETS*1024) ? On my system this was enough for one Ethernet device and plenty of connections. But it wasn't enough when adding PPP to the mix (unless I disabled eth0). Cheers, Kelvin. -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss