|Anonymous | Login | Signup for a new account||2018-08-14 23:33 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0007446||OCaml||standard library||public||2017-01-01 20:27||2017-12-20 21:08|
|Target Version||4.07.0+dev/beta2/rc1/rc2||Fixed in Version|
|Summary||0007446: Unix.gettimeofday allocates memory|
|Description||Unix.gettimeofday allocates a floating point value instead of returning an unboxed float similar to Sys.time.|
Unix.gettimeofday is not really in the standard library, but is included as part of the Ocaml distribution.
|Tags||No tags attached.|
This issue sounds easier to fix than the other your reported so far. Would you be interested in submitting a patch to fix it, preferably as a Github pull request?
The patch that made Sys.time unboxed, contributed by François Bobot, could serve as useful inspiration:
Full discussion (with links to previous GPRs) for that commit at https://github.com/ocaml/ocaml/pull/281. [^]
If this is done, then there are other functions (Unix.time, for starters) which should also receive the same treatment (also remember that every change made in unix must be made in win32unix, too - but in this case the CI will catch it, as unix.mli is shared).
However, there is a potentially important difference - none of these functions is presently declared external, and it may be important to consider if we want to change that.
|I don't think that we would want to declare `external` a function that was not external before (if only because that might break compatibility, although I don't think that people would rely on Unix's signature in practice). I would naively assume that cross-compiling information would be enough for callers to be unboxed as well, but maybe I am wrong?|
|2017-01-01 20:27||markghayden||New Issue|
|2017-01-01 20:32||gasche||Note Added: 0017058|
|2017-01-01 20:32||gasche||Status||new => acknowledged|
|2017-01-01 21:45||dra||Note Added: 0017059|
|2017-01-01 21:59||gasche||Note Added: 0017060|
|2017-02-19 18:10||xleroy||Severity||minor => tweak|
|2017-02-19 18:10||xleroy||Target Version||=> 4.06.0 +dev/beta1/beta2/rc1|
|2017-02-23 16:43||doligez||Category||OCaml standard library => standard library|
|2017-10-11 12:34||frisch||Target Version||4.06.0 +dev/beta1/beta2/rc1 => 4.07.0+dev/beta2/rc1/rc2|
|Copyright © 2000 - 2011 MantisBT Group|