提交 84786c70 编写于 作者: M martin

6851653: (launcher) Make every java process 20 bytes smaller

Summary: Carefully keep track of every byte
Reviewed-by: ksrini, xlu
上级 cda42d8d
...@@ -683,10 +683,16 @@ static void ...@@ -683,10 +683,16 @@ static void
SetClassPath(const char *s) SetClassPath(const char *s)
{ {
char *def; char *def;
const char *orig = s;
static const char format[] = "-Djava.class.path=%s";
s = JLI_WildcardExpandClasspath(s); s = JLI_WildcardExpandClasspath(s);
def = JLI_MemAlloc(JLI_StrLen(s) + 40); def = JLI_MemAlloc(sizeof(format)
sprintf(def, "-Djava.class.path=%s", s); - 2 /* strlen("%s") */
+ JLI_StrLen(s));
sprintf(def, format, s);
AddOption(def, NULL); AddOption(def, NULL);
if (s != orig)
JLI_MemFree((char *) s);
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册