Article View: borland.public.cppbuilder.nativeapi
Article #6049Re: How to Make Sure that Buffer use ONLY memory
From: Andrue Cope [TeamB]
Date: Mon, 13 Jun 2005 10:15
Date: Mon, 13 Jun 2005 10:15
31 lines
2553 bytes
2553 bytes
Deniel wrote: > So the question is - Are you SURE that using 'new' force that > all the allocation will sit ONLY on a 'real' RAM and will not > use the Hard-Disk at all? (and that's what i want) From our experience if your application is the only application running and you are 'hitting' addresses across the entire range on a regular basis Windows will not swap it out. OTOH this is probably only because none of our addresses look idle and nothing else needs them. It might also be that our application is a CPU hog (for good reason) and Windows only looks for idle pages when the scheduler is idle (IOW:We might simply not be giving the OS any spare time to swap things out). In our case it's a hash table so the entire block will look active all the time. If yours is a 'simple' array then Windows might spot areas that haven't been accessed for a while and might swap them out to disk. Then again..that's the way things are supposed to work at least as far as Windows is concerned. If you haven't accessed a page of memory for a while then it /should/ be swapped out to disk. Personally I dislike this proactive swapping strategy but I think I have to concede that MS wouldn't have done it without a good reason. Older style OSes don't do this. They only swap out when something else needs the memory and that's a strategy I much prefer. -- Andrue Cope [TeamB] [Bicester, Uk] http://info.borland.com/newsgroups/guide.html
Technical Details
Message-ID:
<42ad5cc5@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> <42ac8a8a$1@newsgroups.borland.com> <42acebc2$1@newsgroups.borland.com> <42ad5055$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> <42ac8a8a$1@newsgroups.borland.com> <42acebc2$1@newsgroups.borland.com> <42ad5055$1@newsgroups.borland.com> Date: Mon, 13 Jun 2005 11:15:38 +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: <42ad5cc5@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1118657733 217.207.223.34 (13 Jun 2005 03:15:33 -0700) Lines: 31 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