Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saved state portability #58

Open
erlanger opened this issue Nov 18, 2018 · 1 comment
Open

Saved state portability #58

erlanger opened this issue Nov 18, 2018 · 1 comment

Comments

@erlanger
Copy link

Saved state portability

Following a discussion about a port to Android (in SWI-Prolog/swipl-devel#358), there was a concern about creating saved states on one platform and moving them to another platform, especially from a native platform to a different platform (like android). Two cases were observed:

  1. Saved state does not use foreign libraries (e.g. only prolog code)
    • In this case the saved state will work on any other platform with the same pointer size
      (e.g. 32-bit or 64-bit)
    • We can then embed pointer size information in the saved state, and use this saved state
      on the target platform if the pointer size matches.
  2. Saved state depends on foreign (.so) libraries using --foregin=save option
    • In this case, the saved sate depends not only on the pointer size, but also on the
      architecture and the operating system being used.
    • We can embed architecture information in the saved state, and decide --at runtime--
      if the target architecture is compatible with the one embedded in the saved state. This
      will be a best effort approach.
@JanWielemaker
Copy link
Member

Part (I) is solved: saved states no longer depend on the word-length of the machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants