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

Re: [MirageOS-devel] Mirage/ARM plans

On 14 May 2014, at 15:39, Thomas Leonard <talex5@xxxxxxxxx> wrote:
> On 14 May 2014 15:26, Thomas Gazagnaire <thomas@xxxxxxxxxxxxxx> wrote:
>>> Note that when I refer to 'libc', I'm really talking about libm (which
>>> is essential), a printf implementation, and malloc/calloc.
>> Do we steel need the printf stuff for ocaml 4.02 with the new printf's GADTs 
>> implementation ?
> Good point. For now, it's using Mini-OS's printf functions. They
> mostly work, but don't recognise %F, for example.
> For malloc, Mini-OS provides a malloc that returns contiguous regions
> of (guest) physical memory (it just calls _xmalloc(size,
> DEFAULT_ALIGN)). If OCaml just grabs more memory whenever the heap is
> full, that should be fine. If people are freeing stuff, it could
> become a problem due to fragmentation.

There's very little mallocing relative to the amount of OCaml heap activity 
(which allocates in 2MB chunks by default and could use super pages if 
available). So sticking with the simple allocator should be fine for now.

(The exception are perhaps Io_pages which we malloc, but should draw from a 
fixed pool to recycle them and not share them with the main heap, since they 
can be granted to other driver domains).

> For libm, does anyone have an opinion about openlibm?
>  https://github.com/JuliaLang/openlibm

Looks good if it works on ARM (your comment on that issue seems hopefully, but 
it's worrying that it's been open for a year).  Adam Wick extracted libm from 
OpenBSD for HalVM, which we do too. Not sure which is a better option...


> "OpenLIBM is an effort to have a high quality standalone LIBM library.
> It is meant to be used standalone in applications and programming
> language implementations.
> OpenLibm builds on Linux, Mac OS X, and Windows, and with little
> effort, should build on FreeBSD as well. It builds with both, GCC and
> clang.
> The OpenLIBM code derives from the FreeBSD msun implementation, which
> in turn derives from FDLIBM 5.3. As a result, it has a number of fixes
> and updates that have accumulated over the years in msun, and also
> optimized assembly versions of many functions."
> All the other standard libc functions are currently stubbed out and
> either panic or return some suitable default value.
> -- 
> Dr Thomas Leonard        http://0install.net/
> GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
> GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA
> _______________________________________________
> MirageOS-devel mailing list
> MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
> http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

MirageOS-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.