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

Why is Sys.max_array_length so small?

Expand Messages
  • w_a_x_man
    I m using OCaml 4.00.1 on a 32-bit Windows machine. # Sys.max_array_length;; - : int = 4194303 This indicates that arrays can only be 16 megabytes in size.
    Message 1 of 3 , Jul 3, 2013
    • 0 Attachment
      I'm using OCaml 4.00.1 on a 32-bit Windows machine.

      # Sys.max_array_length;;
      - : int = 4194303

      This indicates that arrays can only be 16 megabytes in size.
      Considering that my computer can have 4 gigabytes of RAM,
      this seems needlessly small.

      Is there any way around this short of using a 64-bit
      computer?
    • w_a_x_man
      ... I see that the answer is probably to use Module Bigarray, which also provides multi-dimensional arrays.
      Message 2 of 3 , Jul 3, 2013
      • 0 Attachment
        --- In ocaml_beginners@yahoogroups.com, "w_a_x_man" <w_a_x_man@...> wrote:
        >
        > I'm using OCaml 4.00.1 on a 32-bit Windows machine.
        >
        > # Sys.max_array_length;;
        > - : int = 4194303
        >
        > This indicates that arrays can only be 16 megabytes in size.
        > Considering that my computer can have 4 gigabytes of RAM,
        > this seems needlessly small.
        >
        > Is there any way around this short of using a 64-bit
        > computer?

        I see that the answer is probably to use Module Bigarray, which also provides multi-dimensional arrays.
      • oliver
        ... [...] Yes, 64 Bit machines are better here. 32 Bits is technology from the 1980 s And AFAIK, OCaml was developed with 64 Bit machines in mind; the
        Message 3 of 3 , Jul 3, 2013
        • 0 Attachment
          On Wed, Jul 03, 2013 at 07:10:19AM -0000, w_a_x_man wrote:
          > I'm using OCaml 4.00.1 on a 32-bit Windows machine.
          >
          > # Sys.max_array_length;;
          > - : int = 4194303
          >
          > This indicates that arrays can only be 16 megabytes in size.
          > Considering that my computer can have 4 gigabytes of RAM,
          > this seems needlessly small.
          >
          > Is there any way around this short of using a 64-bit
          > computer?
          [...]

          Yes, 64 Bit machines are better here.

          32 Bits is technology from the 1980's

          And AFAIK, OCaml was developed with 64 Bit machines in mind;
          the developers of OCaml thought, they will spread much faster.

          Ciao,
          Oliver
        Your message has been successfully submitted and would be delivered to recipients shortly.