Replying to Alan and Mike...

On 9/6/13 2:27 AM, Alan Bateman wrote:
On 05/09/2013 22:30, Brent Christian wrote:
>
I don't know Cocoa memory management but from a quick look at the
NSAutoreleasePool docs then what you seems to be right. Folks on
macosx-port-dev would be better to comment on that.

Perhaps Dave could comment?

I see that createUTF8CString doesn't handle malloc failing and it's
not clear how CFStringGetCString behaves when called with NULL. In
any case, this is all early startup and if we have malloc failing
this early then we aren't going to get very far.

Right.

One comment on the error case (fallback to "?") as this is now
duplicated. It might be better to have this fallback in one place
(GetJavaProperties) as I'm pretty sure we'll need to re-examine it
at some point

Done, new webrev is here:

http://cr.openjdk.java.net/~bchristi/7199674/webrev.01/


On 9/6/13 4:09 PM, Mike Duigou wrote:

I am surprised that strdup isn't needed for the constant "?" string
but java_props_md.c seems to include other constant strings in sprops
so I will assume it is just never deallocated in the lifetime of the
JVM.

My understanding is that C string literals go into static storage, and live for the life of the program.


Thanks,
-Brent

Reply via email to