|
|
|
|
|
by docandrew
1021 days ago
|
|
There’s a GNAT release for M1 now. The FSF Ada compiler is based on GCC so it has worked for RISC-V and other ARM CPUs for a little while now as well. Ada’s dynamic memory principles are definitely unique. For heap allocation its based around memory pools, at least in GNAT. For the most part it’s RTTI but you can do manual new/free style too (though discouraged). Ada uses a secondary stack as well for variable-length function returns, so in practice you don’t need to do heap allocation very much. There are also equivalents of some STL containers like vector that can handle heap allocations for you safely. |
|
I went down a bit of a rabbit hole recently looking to see if there was a LLVM way to do this. It looked like it was being worked, but I'm not sure it's the best way to get started with Mac OS and Ada on Apple Silicon.
I'll check out homebrew and macports too... again, just in case!
Thanks again!