Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Can max_array_length be enlarged?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-05-22 (16:13)
From: Dennis (Gang) Chen <Dennis.G.Chen@m...>
Subject: Can max_array_length be enlarged?

In ocaml, the max length of array is determined by the predefined constant
max_array_length. Is it possible to build an array with length
longer than this? I noticed that this constant is defined in source code by:

let max_array_length = (1 lsl (word_size - 10)) - 1;;

Is it safe to modify this code to set a bigger value for max_array_length?

Thank you in advance for any help on this point.

Dennis Gang CHEN    Senior Software Engineer
Motorola Australia Software Centre, Electronic Design Automation
2 Second Avenue, Mawson Lakes, SA 5095, Australia
phone: +61 8 8203 3560,  mailto: