[PATCH RFC v2] algol68: Add allocation function for leaf objects

Jose E. Marchesi jemarch@gnu.org
Wed Jan 14 15:12:04 GMT 2026




> On Tue, Jan 13, 2026, at 6:10 PM, Jose E. Marchesi wrote:
>> Hi Pietro.
>>
>> Given that on the compiler side the leaf switch is very likely known at
>> compile time, wouldn't it be better to define two malloc functions in
>> the runtime and thus avoid the conditional in
>>
>>> +  if (leaf)
>>> +    res = (void *) GC_MALLOC_ATOMIC (size);
>>> +  else
>>> +    res = (void *) GC_MALLOC (size);
>>> +
>>
>> at the cost of an extra symbol exported from libga68?
>
> Yeah, I got in my head that if I was going to have just one function in the 
> front end I’d should have only one in libga68.
>
> Thanks for the reviews. I’ll get a v3 out soon.
>
> Pietro

Thanks.


More information about the Algol68 mailing list