Date: Fri, 09 Mar 2007 09:50:42 -0600 From: Derek Ragona <derek@computinginnovations.com> To: "Dima Sorkin" <dima.sorkin@gmail.com>, freebsd-questions@freebsd.org Subject: Re: limitiation on memory allocation Message-ID: <6.0.0.22.2.20070309094909.024c9dd0@mail.computinginnovations.com> In-Reply-To: <e40293600703090632v3f25742g16e75708ded632ee@mail.gmail.com > References: <e40293600703090632v3f25742g16e75708ded632ee@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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<vector> >#include<boost/shared_array.hpp> > >const unsigned M = 1024*1024; >const unsigned X = 510; // will fail with X > 510 > >int main() { > std::vector<char> huge_v1(X*M); // fails in both ways > // boost::shared_array<char> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6.0.0.22.2.20070309094909.024c9dd0>