- Subject: Re: Can Jed open file larger than the memory?
- From: "John E. Davis" <davis@xxxxxxxxxxxxx>
- Date: Tue, 10 Feb 2009 11:49:50 -0500
On Tue, 10 Feb 2009 09:23:02 +0000 (UTC), Jörg Sommer <joerg@xxxxxxxxxxxx>
wrote:
> if I have a file with say 2GB, but I've only 1GB RAM available. Is Jed
> able to open the file and present it to me for editing?
No. jed is not a large file editor and was never intended to be one.
Rather it was designed for routing tasks such as editing source code,
email, etc.
Internally, jed stores each line of the file as an element of a linked
list. Hence, there is a fixed amount of overhead per line: 20 bytes
per line on a 32 bit system, and 32 bytes per line on a 64 bit system
(assuming sizeof(int)==4). The entire file is read into memory. If
you do not have enough (virtual) memory for the file plus the
overhead, then jed will exit with a fatal memory allocation error.
At some point I intend to explore mmapping the file but the overhead
per line will still be present.
--John
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2009 date index]
[2009 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]