🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Memory usage

#10180
From: Remy Lebeau (TeamB)
Date: Thu, 29 Apr 2004 18:48
18 lines
1454 bytes
"David Ayre" <davidcayre@aol.com> wrote in message
news:40914bba$1@newsgroups.borland.com...

> I want to load the whole file into memory so that
> I can get quick access to individual records.

The easiest way to do that without actually reading the file into memory is
to use a memory map.  Look at the CreateFileMapping() and MapViewOfFile()
functions.

> The question is: does the same problem exist with
> CBuilder which is a 32bit program?

No, 32-bit memory access is much more reliable.


Gambit
Technical Details
Message-ID: <40914f7f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!proxad.net!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40914bba$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,9d5f68b2afb6f0bc
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-04-29 12:10:08 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <40914bba$1@newsgroups.borland.com>
Subject: Re: Memory usage
Date: Thu, 29 Apr 2004 11:48:56 -0700
Lines: 20
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.138.253
Message-ID: <40914f7f$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1083264895 67.22.138.253 (29 Apr 2004 11:54:55 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!proxad.net!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail