๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #12761

Re: A file in memory

#12761
From: Antonio Farfan
Date: Thu, 20 Nov 2003 10:26
36 lines
2178 bytes
Ok, Thanks, the idea is to decrement the time of read, the application read
from the file of 8MB and load a device throught serial port, perhaps this
improvement (load all the file in memory ) is not very useful.


"Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> escribi๏ฟฝ en el
mensaje news:3fbbb925$1@newsgroups.borland.com...
>
> "Antonio Farfan" <amfm0777@hotmail.com> wrote in message
> news:3fbb2ba8@newsgroups.borland.com...
>
> >   When i open one file, all the content of this file is load in the
> memory?,
>
> That depends on how you are opening the file to begin with.  But generally
> no, the file is not loaded into memory, it remains on the hard drive and
the
> OS only loads data into memory when needed/requested.
>
> > and if the answer is not, could be done?
>
> For what purpose exactly?
>
> > The idea is load all the file in the memory to decrement the time
> > of access of one application to this file, (size of file is 8MB, and it
> > is always read by the application.).
>
> That is a lot of data to load into memory at one time.  If you're only
> reading the file, but not modifying it, then have a look at using a memory
> mapping instead.  Look at the CreateFileMapping() and MapViewOfFile()
> functions.
>
>
> Gambit
>
>
Technical Details
Message-ID: <3fbc9769@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3fbb2ba8@newsgroups.borland.com> <3fbbb925$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10cc67,dd3ffa1ba297c535
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-11-20 02:40:25 PST
From: "Antonio Farfan" <amfm0777@hotmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3fbb2ba8@newsgroups.borland.com> <3fbbb925$1@newsgroups.borland.com>
Subject: Re: A file in memory
Date: Thu, 20 Nov 2003 11:26:40 +0100
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4927.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200
NNTP-Posting-Host: 62.15.230.33
Message-ID: <3fbc9769@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1069324137 62.15.230.33 (20 Nov 2003 02:28:57 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail