guile-user
[Top][All Lists]
Advanced

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

Re: Guile bugs


From: Ludovic Courtès
Subject: Re: Guile bugs
Date: Thu, 20 Jul 2017 22:41:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hi Marko,

Marko Rauhamaa <address@hidden> skribis:

> address@hidden (Taylan Ulrich "Bayırlı/Kammer"):

[...]

>>>  2. What would prevent Guile's GC from scanning the mmapped area for
>>>     pointers?
>>
>> I don't know the details but AFAIK this is no problem with Boehm GC.
>
> I don't understand. It can be quite time-consuming to scan gigabytes of
> RAM for pointers.

libgc knows which regions it must scan and mmap’d regions like this are
not among them.

For the record, the loader in Guile 2.2 mmaps .go files in memory just
like this (see ‘load-thunk-from-file’.)

>>>  3. How do I efficiently encode information in a bytevector in Scheme
>>>     code?
>>
>> What sort of data?
>>
>> I have a library called bytestructures that imitates the C type system
>> within Scheme, to be used on bytevectors that contain data structures
>> generated by C code, though the library is built upon a generic core
>> with which other structures can be declared as well.  Not sure if this
>> helps you:
>>
>> https://github.com/TaylanUB/scheme-bytestructures/
>
> That's precisely it. It would be nice to have it as part of standard
> Guile.

Even though I agree that something like bytestructures should eventually
land in Guile, I think Taylan just pointed out that this is something
you can use if you’re dealing with structured binary data.

But again, that really depends on the kind of data you’re dealing with.
Maybe sometimes the tools that (system foreign) provides are good
enough, maybe sometimes you’d rather do something different like Guile’s
ELF parser does.

HTH,
Ludo’.



reply via email to

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