gforth
[Top][All Lists]
Advanced

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

Re: [gforth] Gforth image files and shared c librarys! How to access?


From: Philip Smith
Subject: Re: [gforth] Gforth image files and shared c librarys! How to access?
Date: Tue, 3 Sep 2013 11:22:58 -0600

Thanks Bernd.
   Yes i understand this load issue and how the resolved pointers will not work from save to save.  I figured that was the reason but was not sure.  No reason to rush on the resolving on this issue as i have many other methods to get around what i was doing.  Mostly i was just lazy using some c code that was already there.  I will just rewrite it in forth and be done with it.  
PKS


On Tue, Sep 3, 2013 at 7:20 AM, Bernd Paysan <address@hidden> wrote:
Am Montag, 2. September 2013, 17:16:57 schrieb Philip Smith:
> Hi Bernd
>    Thanks for the information!  I now wonder what i should do?  I know i
> can do this from a script like method but i want the convenience of the
> script method and the convenience of forth but i also want the speed of
> compiled binarys or close to it.  I also would like the benefit of code
> that can work on other platforms.  I guess for now i will just try to
> figure out a best compromise method that will give me the most flexibility
> with the most speed.
>    I will just have to think about this for sometime before i come up with
> a solution.
>    Is the main reason this does not work yet because of some dependency
> Gforth has with some other library or is this an internal Gforth issue?

The main reason is that this is not trivial to do.  We can't just save the
image with the resolved pointers into the library, because next time we load
the library, it might have a different address (it will be the same library,
though, as we load our wrapper, but ASLR is pretty common).

> Maybe i could try and solve this or is there some solution that you Bernd
> and others are already working on?

I'm not working on it right now, but it is on my things to do list. Maybe I'll
move that up in the priority list.  It will only go into the development
branch (git respository).

>    I have done some testing to see the speed benefit of precompiled images
> and i find that there is up to 200 times speed benefit for some of my
> testing code.  I know that seems like an amazing amount as 200 times is
> very noticeable.   My original idea of having small parts of code run from
> the command line and piped to other parts of code would improve if it can
> all be precompiled images.  But another way of structuring code i will need
> to devise to work around this issue then i guess!
>    Thanks again for the answer!  PKS

--
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/



--
                \|||/
-----0oo---( o o )---oo0------
                (_)
From the hand of PKS


reply via email to

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