| Anonymous | Login | Signup for a new account | 2013-05-20 13:46 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0003791 | OCaml | OCaml general | public | 2005-09-15 14:30 | 2007-02-21 16:19 | |||
| Reporter | administrator | |||||||
| Assigned To | xleroy | |||||||
| Priority | normal | Severity | feature | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | ||||||||
| Target Version | Fixed in Version | 3.10+dev | ||||||
| Summary | 0003791: Bug 0003790 - patch | |||||||
| 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; --- > long currpos, file_size; 76,77d74 < map_size = file_size - currpos; < 81c78 < if ((unsigned long) map_size % array_size != 0) --- > if ((unsigned long) file_size % array_size != 0) 83,84c80,81 < dim[major_dim] = (unsigned long) map_size / array_size; < array_size = map_size; --- > dim[major_dim] = (unsigned long) file_size / array_size; > array_size = file_size; 87c84 < if (map_size < 0 || map_size < array_size) { --- > if (file_size < array_size) { 97c94 < addr = mmap(NULL, array_size, PROT_READ | PROT_WRITE, shared, fd, currpos); --- > addr = mmap(NULL, array_size, PROT_READ | PROT_WRITE, shared, fd, 0); 103,107d99 < CAMLprim value ml_get_page_size( value unit ) { < CAMLparam1( unit ); < CAMLreturn ( Val_int( getpagesize() ) ); < } < ---------------- ---------------- | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2005-11-18 10:13 | administrator | New Issue | |
| 2005-11-29 13:12 | doligez | Relationship added | child of 0003790 |
| 2005-12-15 14:07 | doligez | Assigned To | => xleroy |
| 2005-12-15 14:07 | doligez | Description Updated | |
| 2006-06-10 16:30 | xleroy | Note Added: 0003672 | |
| 2006-06-10 16:30 | xleroy | Status | acknowledged => resolved |
| 2006-06-10 16:30 | xleroy | Resolution | open => fixed |
| 2007-02-21 16:19 | xleroy | Status | resolved => closed |
| 2007-02-21 16:19 | xleroy | Fixed in Version | => 3.10+dev |
| Copyright © 2000 - 2011 MantisBT Group |