Re: Newbie: In memory 4 times bigger?

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu