Article View: borland.public.cppbuilder.nativeapi
Article #6052Re: How to Make Sure that Buffer use ONLY memory
From: Andrue Cope [TeamB]
Date: Mon, 13 Jun 2005 10:19
Date: Mon, 13 Jun 2005 10:19
27 lines
1924 bytes
1924 bytes
JD wrote: > > [...] my Windows-XP with my builder 4.0 > > So you know, BCB is a 32 bit compiler which means that it can > reference 4GB so you could use a simple call to 'new' to > allocate the buffer. Good luck on /that/. Normally you can only use a 2GB address space and that includes space for your code and stack. There is a way of getting an extra 1GB address space IIRC but I think it only works on Server versions of Windows. > > [...] I need AS MUCH AS POSSIBLE, my computer have 256 MB, > > if it's possible i want to use ALL the 256 MB. > > That is not possible. By time the OS is up and running and > your application is loaded, you can count on that eating up at > least 100MB. You can use GlobalMemoryStatus() to find out how much physical RAM is currently free then allocate a %ge of that. This works for us. -- Andrue Cope [TeamB] [Bicester, Uk] http://info.borland.com/newsgroups/guide.html
Technical Details
Message-ID:
<42ad5dba$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42ab3793$1@newsgroups.borland.com> <gjmna117s71qnpihpbtg7sqmbbvaob90q6@4ax.com> <42abfa21$1@newsgroups.borland.com> <42ac35d0$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,93efc3d53d15c3e4 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Andrue Cope [TeamB]" <no.spam@not.a.valid.address> Subject: Re: How to Make Sure that Buffer use ONLY memory Newsgroups: borland.public.cppbuilder.nativeapi References: <42ab3793$1@newsgroups.borland.com> <gjmna117s71qnpihpbtg7sqmbbvaob90q6@4ax.com> <42abfa21$1@newsgroups.borland.com> <42ac35d0$1@newsgroups.borland.com> Date: Mon, 13 Jun 2005 11:19:43 +0100 User-Agent: XanaNews/1.17.4.1 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 NNTP-Posting-Host: 217.207.223.34 Message-ID: <42ad5dba$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1118657978 217.207.223.34 (13 Jun 2005 03:19:38 -0700) Lines: 27 X-Authenticated-User: acope Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail