Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bigarray dimensions too limited on 64bit architectures #4457

Closed
vicuna opened this issue Nov 28, 2007 · 2 comments
Closed

Bigarray dimensions too limited on 64bit architectures #4457

vicuna opened this issue Nov 28, 2007 · 2 comments
Assignees
Labels

Comments

@vicuna
Copy link

vicuna commented Nov 28, 2007

Original bug ID: 4457
Reporter: @mmottl
Assigned to: @xavierleroy
Status: closed (set by @xavierleroy on 2008-01-04T09:59:17Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.10+dev
Category: ~DO NOT USE (was: OCaml general)
Related to: #5511
Monitored by: jm @dbuenzli @Chris00 @mmottl

Bug description

The following expression

Bigarray.Array1.create Bigarray.char Bigarray.c_layout 3_000_000_000;;

when evaluated on a 64bit architecture raises this exception:

Exception: Invalid_argument "Bigarray.create: negative dimension".

This seems misleading, because this is not a negative dimension. But even worse, it is an unnecessary limitation on 64bit architectures that nowadays may well have sufficient memory - and need it for demanding applications.

Could you please remove this limitation on platforms that don't require it? - Thanks!

@vicuna
Copy link
Author

vicuna commented Dec 2, 2007

Comment author: @xavierleroy

I agree this limitation should be lifted. The main reason for it was to simplify marshalling when a bigarray is marshalled on a 64-bit platform, then read back on a 32-bit platform. But it should be possible to change the marshalling format to support 64-bit dimensions, yet remain compatible with the current format.

@vicuna
Copy link
Author

vicuna commented Jan 4, 2008

Comment author: @xavierleroy

Removed the limitation on bigarray dimensions in CVS trunk.

The concern with marshalling was a non-issue: output_value refuses to produce marshalled data >= 4 Gb anyway, which is the case for any bigarray having one dimension >= 2^32.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants