std.process: memory allocation with malloc in execv_
kdevel
kdevel at vogtner.de
Mon Jan 30 17:56:34 UTC 2023
On Monday, 30 January 2023 at 17:19:13 UTC, Steven Schveighoffer
wrote:
>> [...]
>> Freeing the memory is — in the "happy path" — neither required
>> nor possible. When unhappy the GC is ready to clean up the
>> mess. I uploaded a patch to the issue.
>
> It's actually fine to use GC, you are right. But use
> `GC.disable` before using it (with a `scope(exit)` to
> re-enable), because running a GC just before exec is also
> pointless.
There is no indication that the GC kicks in after patching (v0)
https://issues.dlang.org/attachment.cgi?id=1868&action=diff
I have a patch v1 in preparation which removes the wrappers
entirely. BTW: There is a non-POSIX function execvpe in the
process.d which is actually a GNU extension.
More information about the Digitalmars-d
mailing list