From: Christopher Quinn <cq@htec.demon.co.uk>
To: Markus Mottl <markus@oefai.at>
Cc: OCAML <caml-list@inria.fr>
Subject: Re: [Caml-list] GC and preventing data relocation
Date: Thu, 20 Mar 2003 18:28:49 +0000 [thread overview]
Message-ID: <3E7A0861.9020607@htec.demon.co.uk> (raw)
In-Reply-To: <20030320151647.GA15121@fichte.ai.univie.ac.at>
Markus Mottl wrote:
> Since there is no way for me to tell the C-library to continue with a
> new location of the string, I'd like to know whether there is any way
> to prevent the GC from moving specific data?
>
> Best regards,
> Markus Mottl
>
i looked into this and came up with:
a) if you have C-heap struct specific to each invocation, register the
field holding the string pointer as a caml root, deregister it on
completion. but that is more overhead.
b) add a CString_tag to the set of value tags, modify the compactor()
routine to take acccount of it, and change the tag of a regular string
at runtime.
unfortunately this scheme greatly inconveniences the design of the
compactor and would likely slow it down.
c) differentiate static from dynamic 'chunks' and allocate strings
from static chunks. this still allows GC to be done on static values
but is easily integrated into the compactor.
interface: val Cstring.make: int -> string ... as normal.
i have a patch for this if you are interested.
it is all down to the compactor and the current version treats values
indifferently.
- chris
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2003-03-20 18:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-20 15:16 Markus Mottl
2003-03-20 18:28 ` Christopher Quinn [this message]
2003-03-21 0:01 ` Markus Mottl
2003-03-21 1:15 ` Christopher Quinn
2003-03-21 12:03 ` Markus Mottl
2003-03-21 16:15 ` Damien Doligez
2003-03-21 16:35 ` Markus Mottl
2003-03-24 6:14 ` Nicolas Cannasse
2003-03-24 8:58 ` Markus Mottl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3E7A0861.9020607@htec.demon.co.uk \
--to=cq@htec.demon.co.uk \
--cc=caml-list@inria.fr \
--cc=markus@oefai.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox