From: Reed Wilson <cedilla@gmail.com>
To: caml-list@yquem.inria.fr
Subject: enter_blocking_section() and string modifications
Date: Tue, 01 Apr 2008 20:13:00 -0700 [thread overview]
Message-ID: <47F2F9BC.4020502@gmail.com> (raw)
Hi guys!
I'm currently writing a multi-threaded program, and part of the program
is low-level string manipulation. I found that (with the code I'm using)
making a tight C loop is quite a bit faster than using OCaml, so I'm
using an external function for that.
My question is: can I use enter_blocking_section() for character
replacement on an OCaml string? I know I can't use it for allocating
anything on the heap due to the possibility of the GC doing funny things
with it, but would straight replacement of existing string data be OK?
I did a test which runs OK, but "has not crashed" <> "will not crash"...
Thanks,
Reed
next reply other threads:[~2008-04-02 3:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-02 3:13 Reed Wilson [this message]
2008-04-02 4:02 ` [Caml-list] " Jacques Garrigue
2008-04-02 4:26 ` Reed Wilson
2008-04-02 8:13 ` Romain Beauxis
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=47F2F9BC.4020502@gmail.com \
--to=cedilla@gmail.com \
--cc=caml-list@yquem.inria.fr \
/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