Article View: borland.public.cppbuilder.nativeapi
Article #6035Re: How to Make Sure that Buffer use ONLY memory
From: Bob Gonder
Date: Sun, 12 Jun 2005 07:11
Date: Sun, 12 Jun 2005 07:11
26 lines
2070 bytes
2070 bytes
Daniel wrote: >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. Have you actually tried to run it without the fancy memory locks, to see if your intuition is right? Have you investigated the VirtualLock functions that Liz mentioned? How much memory do you realy need? A couple MB, no problem. Have you heard of a method called double buffering? You might also want to check out CreateFileMapping and MapViewOfFile especially if your calculations are fairly linear. >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. See VirtualQuerry and VirtualQuerryEx as well as GetSystemInfo and GetProcessWorkingSetSize
Technical Details
Message-ID:
<gjmna117s71qnpihpbtg7sqmbbvaob90q6@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!newsread.com!newsprint.newsread.com!38.119.100.83.MISMATCH!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>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,93efc3d53d15c3e4 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: How to Make Sure that Buffer use ONLY memory Date: Sun, 12 Jun 2005 00:11:42 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <gjmna117s71qnpihpbtg7sqmbbvaob90q6@4ax.com> References: <42ab3793$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.77.155.222 X-Trace: newsgroups.borland.com 1118560298 67.77.155.222 (12 Jun 2005 00:11:38 -0700) Lines: 28 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!newsread.com!newsprint.newsread.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail