help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Compiling glpsol.java using glpk_java.


From: Xypron
Subject: Re: [Help-glpk] Compiling glpsol.java using glpk_java.
Date: Tue, 16 Mar 2010 21:13:45 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100205 SeaMonkey/2.0.3

Hello Nigel,

 This implementation provides the same interface as requested, which is good 
and sufficient.
 The difference appears to be using calloc instead of malloc. As calloc is just 
a convenience
 form of malloc, does this implementation address the issue regarding xmalloc 
you made in
 the origional response?


these are the lines I added to glpk.i:

// Add handling for String arrays in glp_main
%include "various.i"
%apply char **STRING_ARRAY { const char *argv[] };


If an error occurs in glp_main the glp_error_hook will safely return the execution
to the point where the allocated memory can be freed.

See the generated code in Java_org_gnu_glpk_GLPKJNI_glp_1main().

Best regards

Xypron






reply via email to

[Prev in Thread] Current Thread [Next in Thread]