[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rational
From: |
Hans Åberg |
Subject: |
Re: Rational |
Date: |
Tue, 22 May 2018 23:07:58 +0200 |
> On 22 May 2018, at 22:53, David Kastrup <address@hidden> wrote:
>
>>> This was somewhat complicated by some Midi classes being heap-allocated
>>> and containing Rational/Moment members: those Midi classes would have to
>>> become SCM-connected. I did some work on that, don't remember how
>>> complete it was.
>>
>> Guile uses the Boehm GC.
>
> Not Guile 1, and LilyPond will have large amounts of heap space outside
> of Boehm's fully automated sweep areas even in Guile 2 for efficiency
> and compatibility reasons.
Something for the future then.
>> I wrote a C++ wrap for that latter, too. As it turns out to be
>> difficult to keep of pointers into the GC heap, I had to use only
>> those that it supplies. Do you do that?
>
> I don't know what "I had to use only those that it supplies" is supposed
> to mean, so I cannot answer the question.
In addition to the collected GC_malloc, there are GC_malloc_uncollectable and
GC_free that correspond to malloc and free. If one uses the latter pair and
have pointers into the GC heap, they may suddenly disappear, causing strange
memory errors.
In addition, beware that on some platforms, the GC must be initialized before
the first use (like on MacOS), and if one is using global C++ objects with heap
allocations, that must occur before those being initialized, which is before
'main' starts.
- Re: Microrhythm, (continued)
- Re: Microrhythm, Hans Åberg, 2018/05/19
- Re: Microrhythm, metachromatic, 2018/05/22
- Re: Microrhythm, Hans Åberg, 2018/05/22
- Re: Microrhythm, Carl Sorensen, 2018/05/22
- Re: Microrhythm, David Kastrup, 2018/05/22
- Rational, Hans Åberg, 2018/05/22
- Re: Rational, Hans Åberg, 2018/05/22
- Re: Rational, David Kastrup, 2018/05/22
- Re: Rational, Hans Åberg, 2018/05/22
- Re: Rational, David Kastrup, 2018/05/22
- Re: Rational,
Hans Åberg <=
- Re: Rational, David Kastrup, 2018/05/22
- Re: Rational, Hans Åberg, 2018/05/22
- Re: Rational, David Kastrup, 2018/05/22
- Re: Rational, metachromatic, 2018/05/23
- Re: Rational, David Kastrup, 2018/05/23
- Re: Rational, Kieren MacMillan, 2018/05/23
- Re: Rational, Hans Åberg, 2018/05/23
- Re: Rational, David Kastrup, 2018/05/23
- Re: Rational, Hans Åberg, 2018/05/23
- Re: Rational, Werner LEMBERG, 2018/05/23