From owner-freebsd-questions@FreeBSD.ORG Fri Mar 9 15:00:57 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 0A09416A401 for ; Fri, 9 Mar 2007 15:00:57 +0000 (UTC) (envelope-from dima.sorkin@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.231]) by mx1.freebsd.org (Postfix) with ESMTP id B5F8B13C442 for ; Fri, 9 Mar 2007 15:00:56 +0000 (UTC) (envelope-from dima.sorkin@gmail.com) Received: by wr-out-0506.google.com with SMTP id i30so1308227wra for ; Fri, 09 Mar 2007 07:00:56 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=f2fJGHgZxKdTicXRubAN/o5pHE81S5pCTSHh5QjuzctD6gmiXwsvVligdV7DABOBQqk37DPQUZrdFcuEtrjPw3OzrHdcpetiAlVW1JJkQF+Ih/BcImDRYNPInjPcj3T7FaQyBHQsaMie1XfjEAkBR0VF7lijPJb1b+yNy5cEejs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=cAL021bMy2yAWgAmdfDURsq1JeUfV6VJIK6Wr3hJLuIh7OgbevBGsU6XJYll1TLwniuCuDMGD8OEfwnFm38kJmkETgx5UKjCIJ1SSqYpUqXCCbIua22CinPEF44t914gfNB4Mcfh+ZsHvwG8PDosgCT3wAS8cwmuYJYz1BQgO2M= Received: by 10.114.25.3 with SMTP id 3mr574778way.1173450767489; Fri, 09 Mar 2007 06:32:47 -0800 (PST) Received: by 10.114.184.11 with HTTP; Fri, 9 Mar 2007 06:32:47 -0800 (PST) Message-ID: Date: Fri, 9 Mar 2007 16:32:47 +0200 From: "Dima Sorkin" To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: 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:00:57 -0000 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] ); } -------------------------------------------------------