GC seems to crash my C-code function
frame
frame86 at live.com
Sat Sep 18 09:40:57 UTC 2021
On Friday, 17 September 2021 at 14:29:23 UTC, Steven
Schveighoffer wrote:
> Looking at that signature, it does not appear that it uses
> zero-termination at all, as it takes a length. So using `dup`
> and therefore the gc is totally unnecessary.
>
> I'm assuming that string is the barcode argument?
No, the string appears inside the C-function. I'm calling the
function with .ptr and the .length property as it expects.
>
> The `-vgc` switch appears to only identify allocations that the
> compiler invokes via hooks, not ones that other functions
> invoke (or ones that are direct calls into the GC).
...
>
> The docs for `-vgc` should really be updated to clarify. It
> currently just says "List all gc allocations including hidden
> ones".
>
> -Steve
Thanks for clarification!
More information about the Digitalmars-d-learn
mailing list