caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Metalscan <contact@metalscan.fr>
To: caml-list@inria.fr
Subject: [Caml-list] java: short [] [] -> JNI -> int array array
Date: Thu, 28 Nov 2002 20:02:20 +0100	[thread overview]
Message-ID: <20021128190209.GA19294@rhinoceros.mts> (raw)

Hello,

I have a problem wich I couldn't solve after one long day of tests.

I've written a module to process some datas in ocaml. The program wich
will use it is in java (I do not have the choice).

Java must pass the datas to ocaml and call my functions. I turned my
module into a dynamic link library (linux ; I'll have to to this on Windowd NT).

I use Jni to call my native (Java) functions, which are registered
callbacks (ocalm) in a C function.

The transfer of "simple" datas from java to C works ok with int, float,
short []. For the latter I passed bigs arrays (about 10^6, i think).
I'll still have to give back the results to the Java world...


My problem is to pass a multidimensionnal array. When they are too big,
there is a problem during my conversion function. I suspect a misunderstanding of
the GC...

Does anybody have an example of such a creation ? I must precise that,
of course, I don't know the number of rows at compilation time, and that
the size of each of them is not garanted to be the same.

Thanks in advance for your time and any suggestion

Matthieu Dubuget
-------------------
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


             reply	other threads:[~2002-11-28 23:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-28 19:02 Metalscan [this message]
2002-11-29 12:19 ` Metalscan

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=20021128190209.GA19294@rhinoceros.mts \
    --to=contact@metalscan.fr \
    --cc=caml-list@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;
as well as URLs for NNTP newsgroup(s).