From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,55a8252137b5ef97 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news.illinois.net!attcg1!ip.att.net!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: Efficiently setting up large quantities of constant data Date: 16 Dec 2004 15:52:28 -0600 Organization: LJK Software Message-ID: <4LGruwf2lqzz@eisner.encompasserve.org> References: NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1103233875 19150 192.135.80.34 (16 Dec 2004 21:51:15 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Thu, 16 Dec 2004 21:51:15 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:7002 Date: 2004-12-16T15:52:28-06:00 List-Id: In article , Andre writes: > Dr. Adrian Wrigley wrote: >> For example, suppose I have a binary file "distances.dat" containing >> the (road) distances between 1000 different cities. This could be a 2MB >> file computed by another application. How can I build a single executable >> file containing the data and access it from the Ada code? > 2. Use a memory mapped file. This way you also get a pointer to the data > and Windows is taking care of loading it into the memory. Data reading > using a memory mapped file is just as fast as putting it in the executable. But since he did not say the purpose of putting it in the application was for speed, I think we have to presume it was for religious reasons.