Review request for 5049299

Michael McMahon Michael.McMahon at Sun.COM
Fri May 22 11:05:09 UTC 2009


Hi David,

>
> In the Makefile:
>
> + HELPER_EXE = $(BINDIR)/processhelper$(EXE_SUFFIX)
>
> Isn't EXE_SUFFIX superfluous here? It has to be an empty string 
> otherwise the Java code won't know the name of the helper.
>
Yes, it is superfluous. I took the pattern from another makefile,
but it is probably better to remove it for maximum clarity.
> In UnixProcess_md.c:
>
> 116 jlup_xmalloc(void *env, int size)
>
> Why did you have to lose the type of env ?
> Why is this function defined differnetly in two files?
>
This malloc function is invoked in code that is common to the 
UNIXProcess native code,
and processhelper. The native code knows about JNI and it needs the JNI 
env in order to
be able to call  JNU_ThrowOutOfMemoryError((JNIEnv *)env, NULL);

But the implementation in processhelper, does not know about JNI, so it 
ignores the env
parameter, and in order to avoid including JNI header files in 
processhelper I made
it a void *, which is casted to a JNIEnv * in the other version.

Thanks,
Michael




More information about the core-libs-dev mailing list