From owner-freebsd-questions@FreeBSD.ORG Fri Mar 9 15:51:19 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 17A5516A401 for ; Fri, 9 Mar 2007 15:51:19 +0000 (UTC) (envelope-from derek@computinginnovations.com) Received: from betty.computinginnovations.com (dsl081-227-250.chi1.dsl.speakeasy.net [64.81.227.250]) by mx1.freebsd.org (Postfix) with ESMTP id AD37713C441 for ; Fri, 9 Mar 2007 15:51:16 +0000 (UTC) (envelope-from derek@computinginnovations.com) Received: from p28.computinginnovations.com (dhcp-10-20-30-100.computinginnovations.com [10.20.30.100]) (authenticated bits=0) by betty.computinginnovations.com (8.13.8/8.12.11) with ESMTP id l29FopCW026494; Fri, 9 Mar 2007 09:50:52 -0600 (CST) Message-Id: <6.0.0.22.2.20070309094909.024c9dd0@mail.computinginnovations.com> X-Sender: derek@mail.computinginnovations.com X-Mailer: QUALCOMM Windows Eudora Version 6.0.0.22 Date: Fri, 09 Mar 2007 09:50:42 -0600 To: "Dima Sorkin" , freebsd-questions@freebsd.org From: Derek Ragona In-Reply-To: References: Mime-Version: 1.0 X-ComputingInnovations-MailScanner-Information: Please contact the ISP for more information X-ComputingInnovations-MailScanner: Found to be clean X-ComputingInnovations-MailScanner-From: derek@computinginnovations.com X-Spam-Status: No Content-Type: text/plain; charset="us-ascii"; format=flowed X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: limitiation on memory allocation X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2007 15:51:19 -0000 check out your sysctl values. man sysctl for more information. -Derek At 08:32 AM 3/9/2007, Dima Sorkin wrote: >Hi. > >On FreeBSD 6.2 i386 with 2GB of physical memory I can't allocate >more than 500Mb for my program. > >I'm a new to FreeBSD. Is this limitatin is something known, >how do I overcome it ? > >(On linuxes I can allocate arrays of size close to sum >of physical and swap memory, on similar machines) > >Thank you and regards, >Dima. > >$ top >... >Mem: 65M Active, 357M Inact, 142M Wired, 404K Cache, 112M Buf, 1437M Free >Swap: 4070M Total, 4070M Free >... > >test code: >------------------------------------------------------- >#include >#include > >const unsigned M = 1024*1024; >const unsigned X = 510; // will fail with X > 510 > >int main() { > std::vector huge_v1(X*M); // fails in both ways > // boost::shared_array huge( new char[X*M] ); >} >------------------------------------------------------- >_______________________________________________ >freebsd-questions@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-questions >To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > >-- >This message has been scanned for viruses and >dangerous content by MailScanner, and is >believed to be clean. >MailScanner thanks transtec Computers for their support. > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support.