Article View: borland.public.cppbuilder.nativeapi
Article #12742Re: A file in memory
From: Remy Lebeau (TeamB)
Date: Wed, 19 Nov 2003 18:44
Date: Wed, 19 Nov 2003 18:44
26 lines
1798 bytes
1798 bytes
"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:
<3fbbb925$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!skynet.be!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3fbb2ba8@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,dd3ffa1ba297c535 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-11-19 11:10:08 PST From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3fbb2ba8@newsgroups.borland.com> Subject: Re: A file in memory Date: Wed, 19 Nov 2003 10:44:22 -0800 Lines: 28 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 67.22.137.149 Message-ID: <3fbbb925$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1069267237 67.22.137.149 (19 Nov 2003 10:40:37 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!skynet.be!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail