|
|
|
|
|
by melissalobos
1457 days ago
|
|
I do think that Julia in general isn't the best for interacting with C(based off of some experimenting 2 years ago). I have tried using it with a decent number of odd C libraries used in Scientific Computing(with actual capital S and C. Which always involved binary blob libraries.). I think if you control more of the stack it is a better language. But when using it with vendor provided binaries I ran into many many issues. > "with actual capital S and C." This part was referencing the industry and not me being egotistic. |
|
Creating mutable structs and `GC.@preserve`ing them is an effective means of getting stack allocated memory, so long as the structs do not escape.
E.g., I occasionally follow this approach: