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?


Jörg Sommer <joerg@xxxxxxxxxxxx> wrote:
> 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.

Have you tried a recent version in the svn repository?  The autoconf
configure script should set these variables.

[...]
>> 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?

Instead of mallocing the `data' pointer in each linked list node to
hold the line, `data' would be set to the appropriate mmapped value.
If the corresponding line is changed, a malloc for it would occur at
that point.  In other words, the overhead per line would still be
there, but the only other memory that would be used would be for those
lines that have changed.

As far as find_binary_file goes, the lines are still newline (\n)
delimited.

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