From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id AAA05945; Fri, 29 Nov 2002 00:16:41 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id AAA06095 for caml-list@pauillac.inria.fr; Fri, 29 Nov 2002 00:16:41 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA01524 for ; Thu, 28 Nov 2002 20:03:54 +0100 (MET) Received: from mel-rto2.wanadoo.fr (smtp-out-2.wanadoo.fr [193.252.19.254]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gASJ3s125243 for ; Thu, 28 Nov 2002 20:03:54 +0100 (MET) Received: from mel-rta10.wanadoo.fr (193.252.19.193) by mel-rto2.wanadoo.fr (6.5.007) id 3DDA11D800685CEF for caml-list@inria.fr; Thu, 28 Nov 2002 20:03:54 +0100 Received: from ADijon-106-1-11-18.abo.wanadoo.fr (81.48.239.18) by mel-rta10.wanadoo.fr (6.5.007) id 3DD0D46B00A175B8 for caml-list@inria.fr; Thu, 28 Nov 2002 20:03:54 +0100 Received: from 192.168.2.36 (ident=mail) by poulain.metalscan.fr with esmtp (MasqMail 0.1.16) id 18HUEE-55s-00 for caml-list@inria.fr; Thu, 28 Nov 2002 20:21:38 +0100 Received: from rhinoceros.mts ([192.168.1.4]) by drakar.mts with esmtp (Exim 3.35 #1 (Debian)) id 18HTsH-0000IT-00 for ; Thu, 28 Nov 2002 19:58:57 +0100 Received: from matt by rhinoceros.mts with local (Exim 3.35 #1 (Debian)) id 18HTvY-00051m-00 for ; Thu, 28 Nov 2002 20:02:21 +0100 Date: Thu, 28 Nov 2002 20:02:20 +0100 From: Metalscan To: caml-list@inria.fr Subject: [Caml-list] java: short [] [] -> JNI -> int array array Message-ID: <20021128190209.GA19294@rhinoceros.mts> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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