Re: [eclipse-clp-users] Embed ECLiPSe in Eclipse Plugin

From: Joachim Schimpf <joachim.schimpf_at_...44...>
Date: Fri, 02 Oct 2009 11:03:17 +1000
Kish Shen wrote:
> Oliver Scheickl wrote:
>> Hi all,
>> I want to embed ECLiPSe in Java. I read the introduction, manual, JavaDocs
>> etc.
>> If i execute a pure simple Java program that starts instantiates an
>> EmbeddedEclipse object everything is fine. However, when I execute the same
>> code from within an Eclipse plug-in's pop-up action I get the following
>> error:
>> "Cannot reserve stack space in alloc_stack_pairs()"
>> This looks like it came from ECLiPSe, not from Eclipse. I also tried to put
>> the code in an own thread, same issue.
>> Do you have any ideas how I can avoid this error and start ECLiPSe from
>> within an Eclipse plug-in?
> Hi Oliver,
> The error means that ECLiPSe was not able to obtain the memory it asks 
> for. I assume this is because Eclipse reserves/uses a lot of memory for 
> itself. You can reduce the amount of memory ECLiPSe reserves when you 
> configure the engine with EclipseEngineOptions, see
> The default reservation for the global/trail stacks is quite large, and 
> it is likely that this is causing the problem, so you should probably 
> change the default setting for this. I am not absolutely certain, but I 
> think the default is about 800M, so try something smaller than this.

The default is 256MB (128 local + 128 global stack). Try with 1+16 instead.

But it might be better to completely avoid any address space competition
between Eclipse and ECLiPSe, by using an OutOfProcess ECLiPSe, see

-- Joachim
Received on Fri Oct 02 2009 - 01:03:24 CEST

This archive was generated by hypermail 2.3.0 : Thu Aug 22 2019 - 06:14:48 CEST