M
Mironov Leonid
Guys , hi !
I have the following problem :
i want to create something similar to windows' FileMapping.
I have an application in C that had allocated some memory buffer and
now it writes to this buffer every once in a while.
I want this buffer to be available for reading from JAVA applications,
but :
since performance is really an issue here, i don't want to issue a jni
call
each time i want my java application needs to access the buffer, (even
if the C application can fire some kind of event)
I would like the java app. call the jni method once, get the shared
memory location and be able to treat it as a buffer as well - with
changes appearing directly as they are seen to the C program.
(For example the Java app. could spin loop on some location in the
shared memory and act as soon the value changes...)
Is there a conceptual problem to accomplish my mission ?
If not ,how can i achieve that ?
thanks in advance.
Lenny
I have the following problem :
i want to create something similar to windows' FileMapping.
I have an application in C that had allocated some memory buffer and
now it writes to this buffer every once in a while.
I want this buffer to be available for reading from JAVA applications,
but :
since performance is really an issue here, i don't want to issue a jni
call
each time i want my java application needs to access the buffer, (even
if the C application can fire some kind of event)
I would like the java app. call the jni method once, get the shared
memory location and be able to treat it as a buffer as well - with
changes appearing directly as they are seen to the C program.
(For example the Java app. could spin loop on some location in the
shared memory and act as soon the value changes...)
Is there a conceptual problem to accomplish my mission ?
If not ,how can i achieve that ?
thanks in advance.
Lenny