Question for keeping pages in the RAM?

08/02/2004 - 11:49 por Frank | Informe spam
Hi,folks

I am a beginner, I wanna allocate a number of pages of space for some
operations, and I need keeping those pages stay in the RAM at all for
operating faster.Is there WIN32 API can do it? Any reply is appreciated :p

Thanx very very ... much!

Frank F.Han

+--+
| winsays@:-)hotmail:-).com |
+--+

Preguntas similare

Leer las respuestas

#6 Tim Roberts
10/02/2004 - 08:28 | Informe spam
"Frank" wrote:

I am a beginner, I wanna allocate a number of pages of space for some
operations, and I need keeping those pages stay in the RAM at all for
operating faster.Is there WIN32 API can do it? Any reply is appreciated :p



It is almost never a good idea to try to outsmart the system, even if you
aren't a beginner. We make fun of them, but Microsoft employs a LOT of
smart people.

If you keep accessing memory pages, Windows will make sure those pages stay
in memory. If you AREN'T accessing certain pages, then Windows might as
well roll them out to the page file, and let the memory be used by
something that really IS being accessed. You don't help your performance
by leaving idle memory that could be used for something else.

There are sophisticated algorithms in the operating system to make sure the
swap file is used as little as possible. It is quite unlikely you could do
better on your own. Seriously, let the system handle it.
- Tim Roberts,
Providenza & Boekelheide, Inc
Respuesta Responder a este mensaje
#7 Frank
11/02/2004 - 02:52 | Informe spam
Thanx Tim very ... much, I got it :p

"Tim Roberts"
:
"Frank" wrote:
>
>I am a beginner, I wanna allocate a number of pages of space for some
>operations, and I need keeping those pages stay in the RAM at all for
>operating faster.Is there WIN32 API can do it? Any reply is appreciated


:p

It is almost never a good idea to try to outsmart the system, even if you
aren't a beginner. We make fun of them, but Microsoft employs a LOT of
smart people.

If you keep accessing memory pages, Windows will make sure those pages


stay
in memory. If you AREN'T accessing certain pages, then Windows might as
well roll them out to the page file, and let the memory be used by
something that really IS being accessed. You don't help your performance
by leaving idle memory that could be used for something else.

There are sophisticated algorithms in the operating system to make sure


the
swap file is used as little as possible. It is quite unlikely you could


do
better on your own. Seriously, let the system handle it.
- Tim Roberts,
Providenza & Boekelheide, Inc
Respuesta Responder a este mensaje
#8 Kirk Ferdmann
11/02/2004 - 06:19 | Informe spam
"Frank" wrote in message
news:
I dont know hom many numbers of bytes for allocating
which to be data cache for some common processes (not file IO here). That
cache need at least 8kb space. You know, as my thinking that allocate more
space which is greater than 8kb could reduse times of IO and therefore
improve speed. Does my thinking is right? Give me some advice, very Thanx.



On an NT-derived OS each cache entry is 256K.

-Kirk
Respuesta Responder a este mensaje
#9 Kirk Ferdmann
11/02/2004 - 06:21 | Informe spam
"Alexander Grigoriev" wrote in message
news:
When working with huge files, Windows cache tends to grow uncontrollably


at
the cost of application memory. It's definitely not suited for such a


case.
And there is no way to limit such cache bloat (there was in Windows 9x).



Wasn't that corrected in Windows 2000? I mean sparse index arrays support.

-Kirk
Respuesta Responder a este mensaje
#10 Alexander Grigoriev
11/02/2004 - 06:36 | Informe spam
Only a few related problems has been corrected. Such as CopyFile(Ex) now
seems to open a big file in FILE_FLAG_NO_BUFFERING mode.

Sparse index array support is for working with sparse files. I am talking
about non-sparse files, such as big AVI or WAV.

"Kirk Ferdmann" wrote in message
news:
"Alexander Grigoriev" wrote in message
news:
> When working with huge files, Windows cache tends to grow uncontrollably
at
> the cost of application memory. It's definitely not suited for such a
case.
> And there is no way to limit such cache bloat (there was in Windows 9x).

Wasn't that corrected in Windows 2000? I mean sparse index arrays support.

-Kirk


Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaSiguiente AnteriorRespuesta Tengo una respuesta
Search Busqueda sugerida