Article View: borland.public.cppbuilder.nativeapi
Article #6031How to Make Sure that Buffer use ONLY memory
From: Daniel
Date: Sat, 11 Jun 2005 19:12
Date: Sat, 11 Jun 2005 19:12
31 lines
1975 bytes
1975 bytes
Hello, While running i need to create a buffer that will hold data, and i need to do lot of calculations on this buffer, i need it to be as fast as possible, and i need that the buffer will also be as large as possible to hold as much data as it possibly can. Now the problem is this, as i understand if i declare on a very large buffer and fills if with data, like this for example - double *HugeBuffer = new double[0xFFFFFFFFFFFFFFFFFFFFFF]; Fills HugeBuffer[] with data from file... then becouse the PC doesn't have so much memory it will use part of the Hard-Drive to hold this buffer data, but that will slow down my calculations right? so i want to make sure that all the data in my application while running is presents ONLY in the PC real memory and not on the hard disk, i don't want the program to waste time approaching the hard disk reading and writing data to the buffer. So How do i detect what is the largest size of buffer that i can use that will not use the hard drive space? i guess that it can be change from one running to another depends on the amount of memory which is in used at that moment. Thanks, Dani.
Technical Details
Message-ID:
<42ab3793$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,93efc3d53d15c3e4,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Daniel" <DenielMail@Internet.com> Sender: "Daniel" <DenielMail@Internet.com> Reply-To: "Daniel" <DenielMail@Internet.com> Subject: How to Make Sure that Buffer use ONLY memory Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 217.132.136.32 NNTP-Posting-Host: 207.105.83.66 Message-ID: <42ab3793$1@newsgroups.borland.com> Date: 11 Jun 2005 12:12:19 -0700 X-Trace: newsgroups.borland.com 1118517139 207.105.83.66 (11 Jun 2005 12:12:19 -0700) Lines: 32 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.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