[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Damien Doligez <Damien.Doligez@i...> |
| Subject: | Re: Calling C from OCaml, GC problems |
>From: Max Skaller <maxs@in.ot.com.au> > >I'd recommend getting rid of those macros. Anyone writing >a CAML/C interface needs to understand details of how the GC >works so as to optimise code to exactly the required >functions to create temporary roots, etc .. it would be better >to provide the raw functions and a good explanation. Even with the raw functions and a perfect understanding of the system, I found it extremely difficult to write bug-free code, and very time-consuming to fish out the inevitable bugs. That's why the macros exist. For most people, it is more economical to write slightly less efficient code if that means less debugging time and fewer bugs in the released version. >I do wonder if it would not be useful to have a function(s) >that did allocations without collecting. If only we knew how to do that, we could get rid of the GC altogether. (tongue in cheek) -- Damien