On Fri, 12 Nov 2004 07:38:57 -0500, Gyepi SAM <[EMAIL PROTECTED]> wrote:
> On Fri, Nov 12, 2004 at 02:11:37AM -0500, Aaron Sherman wrote:
[...]
> I think mmap would be just as ideal in Perl and a lot less work too.
> Rather than indexing and parsing a *large* file, you must mmap
> and parse it. In fact, the CSV code, which was left as an exercise in you
> pseudo-code, would be the only code required.

It depends on your definition of ideal.  A Perl string is far more
complex than a C string, and translating between the two adds
complexity.  It requires an external module and adds platform
dependencies.

> I should point out though that mmap has a 2GB limit on systems
> without 64bit support. Such systems can't store files larger than
> that anyhow.

This is at best 2/3 correct.

First you're right that mmap has a 2 GB limit because it maps
things into your address space, and so the size of your pointers
limit what you can address.

It is also correct that there are complications in handling large
files on 32 bit systems.  Most operating systems didn't handle
that case.

However today most 32 bit operating systems have support
for large files, and Perl added the necessary hooks to take
advantage of it several versions ago.  So if you have a
relatively up to date system, odds are very good that you
don't have a 2 GB limit.  Certainly not on Windows or Linux.

Cheers,
Ben
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to