Re: Newbie: In memory 4 times bigger?
- Posted by Patrick Barnes <mrtrick at gmail.com> Feb 15, 2005
- 512 views
That is true. If you want to do operations on files that may be to large to hold in memory at once, I suggest that you only read into memory the bit that you are working on, and leave the rest of it in the file. For instance, database managers rarely keep the entire database file in memory. They hold the indexes in memory, and use them to figure out where the record they need is in the file, seek() to that point, and just read that into memory. On Mon, 14 Feb 2005 18:26:52 -0800, Brent W. Hughes <guest at rapideuphoria.com> wrote: > > posted by: Brent W. Hughes <bwh566 at yahoo.com> > > Am I correct in assuming that if a file is 1000 bytes big on disk, that when > it is read into memory (with get_bytes()), it will take up 4000 bytes of memory? > > Brent > > > > -- MrTrick