Re: Add DragonFly BSD port

  • From: Robin Hahling <robin.hahling@xxxxxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sun, 05 Oct 2014 19:05:16 +0200

This is a multi-part message in MIME format.
On Friday 03 October 2014 14.04:42 Mike Pall wrote:
> Robin Hahling wrote:
> > As an attachment, you will find a patch that adds DragonFly BSD support.
> > The patch is from John Marino and has been in use for quite some time now
> > in official DragonFly BSD packages without any user reporting issues.
> I'm pretty sure the code doesn't work in the general case with a
> fragmented memory map. It attempts to do a linear scan, but it
> only performs a single retry.
> 
> Please refactor this to use the already existing code for mmap()
> allocation hinting. This already includes a special case for a
> near-exhaustive linear scan.

You can find attached a new patch which uses the existing code for mmap.
As a simple test, I ran the scimark test[1]. Please, feel free to ask if I 
need to do more exhaustive testing.

> > However, it seems to me that an adjustment should be made to
> > src/lj_gdbjit.c and src/jit/bcsave.lua. "dragonfly" should be need in
> > map_os in the latter and I'm not sure about .eosabit in the former.
> 
> You can find out by looking at the header of any binary on the
> target OS.

DragonFly actually uses UNIX/SYS V. and thus the version number for this is 0.
I thus changed the sources to make it clear even though the default case is 0.

Cheers,

Robin

[1]: http://luajit.org/download/scimark.lua 












Other related posts: