You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 3791 Reporter: administrator Assigned to:@xavierleroy Status: closed (set by @xavierleroy on 2007-02-21T15:19:36Z) Resolution: fixed Priority: normal Severity: feature Fixed in version: 3.10+dev Category: ~DO NOT USE (was: OCaml general) Child of:#3790
Bug description
Hi,
attached is a patch (against ocaml-3.08.3/otherlibs/bigarray/mmap_unix.c)
for the offset problem. It uses currpos of the file descriptor as
offset in mmap. But maybe it would be better to make a new function like
"bigarray_map_file_with_offset".
Best regards,
Christoph Bauer
Dipl. Inf.
LMS Deutschland GmbH
Luxemburgerstr. 7
D-67657 Kaiserslautern
Original bug ID: 3791
Reporter: administrator
Assigned to: @xavierleroy
Status: closed (set by @xavierleroy on 2007-02-21T15:19:36Z)
Resolution: fixed
Priority: normal
Severity: feature
Fixed in version: 3.10+dev
Category: ~DO NOT USE (was: OCaml general)
Child of: #3790
Bug description
Hi,
attached is a patch (against ocaml-3.08.3/otherlibs/bigarray/mmap_unix.c)
for the offset problem. It uses currpos of the file descriptor as
offset in mmap. But maybe it would be better to make a new function like
"bigarray_map_file_with_offset".
Best regards,
Christoph Bauer
Dipl. Inf.
LMS Deutschland GmbH
Luxemburgerstr. 7
D-67657 Kaiserslautern
T +49 631 303 22 152
mailto:Christoph.Bauer@lms-gmbh.de
http://www.lmsintl.com
22d21
< #include "memory.h"
47c46
< long currpos, file_size, map_size;
83,84c80,81
< dim[major_dim] = (unsigned long) map_size / array_size;
< array_size = map_size;
87c84
< if (map_size < 0 || map_size < array_size) {
97c94
< addr = mmap(NULL, array_size, PROT_READ | PROT_WRITE, shared, fd, currpos);
The text was updated successfully, but these errors were encountered: