From: "Nicolas Cannasse" <warplayer@free.fr>
To: "Markus Mottl" <markus@oefai.at>,
"Damien Doligez" <damien.doligez@inria.fr>
Cc: "OCAML" <caml-list@inria.fr>
Subject: Re: [Caml-list] GC and preventing data relocation
Date: Mon, 24 Mar 2003 15:14:42 +0900 [thread overview]
Message-ID: <006201c2f1cc$a910ad20$2713f9ca@WARP> (raw)
In-Reply-To: <20030321163508.GA10107@kiefer.ai.univie.ac.at>
> > If the string is in the minor heap, you know it's a short string and
> > you can (for example) copy it into a buffer pre-allocated in the C heap.
>
> Unfortunately, this won't work, because the callback may again call the
> C-code, either overwriting the buffer or requiring me to write my own
> memory management. I don't think the latter is worthwhile so I'll just
> dynamically allocate buffers as required.
So, what about running a full_major, that should empty the minor heap and
move your string into the major heap.
Or else, explicity create a major heap ocaml block and copy the string into
it ( in not already in major heap ).
Nicolas Cannasse
-------------------
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-24 6:15 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
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 [this message]
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='006201c2f1cc$a910ad20$2713f9ca@WARP' \
--to=warplayer@free.fr \
--cc=caml-list@inria.fr \
--cc=damien.doligez@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