mukul-rathi / bolt

Bolt is a language with in-built data-race freedom!
MIT License
573 stars 53 forks source link

Heap memory management #145

Closed dumblob closed 3 years ago

dumblob commented 3 years ago

I couldn't find much information about memory management. But from a language claiming data race freeness I'd expect to have memory allocation and freeing solved in compile time.

Does Bolt use any garbage collector? Or does it ignore free()ing the allocated (malloc() etc.) memory? Could you shed some light on how does all this work together with threading?

I can imagine something like Lobster's automatic memory management and Nim's ARC or Vaporization. But with proved correctness against data races among threads.

mukul-rathi commented 3 years ago

Hey, I use GC_malloc which handles GC for now. (I haven’t got round to properly implementing my own custom GC). I think that whilst we’ve seen data race freedom associated with memory management in other languages, Bolt’s capability-based type system is orthogonal to memory management (see Pony, Encore for similar GC-based languages)

dumblob commented 3 years ago

Ok, thanks. That answered my question :wink:.