Loading ...
Sorry, an error occurred while loading the content.

13768Re: "ocaml_beginners"::[] what limits Sys.max_string_length and can it be increased ?

Expand Messages
  • Sergei Steshenko
    Feb 20, 2013
    • 0 Attachment
      Even though my desktop (but not laptop) CPU is capable of running 64 bits, I still prefer 32 bit versions of Linux for various practical reasons.

      Could you shed some light on data representation in OCaml ? AFAIK integers are 31 rather than 32 bits - which according to my (naive ?) understanding should limit things from 4G to 2G. And that would be OK for me.

      But why 16M ?

      Thanks,
        Sergei.




      ----- Original Message -----
      > From: Hongbo Zhang <hongboz@...>
      > To: ocaml_beginners@yahoogroups.com
      > Cc:
      > Sent: Thursday, February 21, 2013 1:45 AM
      > Subject: Re: "ocaml_beginners"::[] what limits Sys.max_string_length and can it be increased ?
      >
      > Hi Sergei, try 64 bit ocaml. The length limit is due to the data
      > representation chosen by ocaml.
      >
      > On Wed, Feb 20, 2013 at 6:41 PM, Sergei Steshenko
      > <sergstesh@...>wrote:
      >
      >> **
      >>
      >>
      >> Hello,
      >>
      >> I've checked Sys.max_string_length:
      >>
      >> "
      >> # Sys.max_string_length;;
      >> - : int = 16777211
      >> ".
      >>
      >> By my standards it's a small value. For example, in Perl strings can
      > have
      >> whatever length - of course, limited by available memory.
      >>
      >> Why in OCaml (or in the module) the value is limited by approximately 16M
      >> and can it be increased ?
      >>
      >> Thanks,
      >> Sergei.
      >>  
      >>
      >
      >
      >
      > --
      > -- Regards, Hongbo
      >
      >
      > [Non-text portions of this message have been removed]
      >
      >
      >
      > ------------------------------------
      >
      > Archives up to December 31, 2011 are also downloadable at
      > http://www.connettivo.net/cntprojects/ocaml_beginners
      > The archives of the very official ocaml list (the seniors' one) can be found
      > at http://caml.inria.fr
      > Attachments are banned and you're asked to be polite, avoid flames
      > etc.Yahoo! Groups Links
      >
      >
      >
    • Show all 6 messages in this topic