Hi,
Indeed. We could malloc and set-finalizer! and that should work and be
safe. However, as far as I understand, this approach has some disadvantages:
- malloc is relatively slow compared to chicken's internal allocation (eg
make-string) that uses the stack
- there is a practical limit on finali
Kristian Lein-Mathisen writes:
> From what I gather, there is no way to allocate memory and return a pointer
> to it, safely, in CHICKEN.
> Won't the garbage collector potentially overwrite whatever region was
> allocated since it has no way of knowing it?
There's allocate from chicken.memory
Hi Evan,
And thanks for getting back to me. I found another problem related to
memory corruption and I've been digging around. I have patches for that
too, but I don't know if they suffice. They sort of break existing
conventions of everything in libgit2 being foreigners and c-pointers.
I'm attac
Hi Kristian,
On 2021-06-12 15:36, Kristian Lein-Mathisen wrote:
> I think I may have come across a bug in the git egg.
You're right! THanks for pointing this out, I guess you must be the
first person to use that `frombuffer` procedure.
Everything you've said looks correct to me, I'll try to publ