jed-users mailing list

[2009 Date Index] [2009 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Can Jed open file larger than the memory?


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]