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?


Hi John,

"John E. Davis" <davis@xxxxxxxxxxxxx> wrote:
> 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.

So jed can handle file of arbitrary size as long as there's enough
memory.

I ask because of the bug report for jed failing on big filesystems. I've
got the advice to compile jed with -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64. There are systems with 32GB RAM where you could
open a 16GB file in jed without problems. Therefore, jed should support
big files.

> 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.

But you would mmap the whole file at once? So this doesn't change
anything. Or am I wrong?

Bye, Jörg.
-- 
Alles, wovor wir Angst haben müssen, ist die Angst selbst.
       	     	       	     	     	 (Franklin D. Roosevelt)

--------------------------
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]