|
|
|
|
|
by arghwhat
650 days ago
|
|
The stack is fully automatic arbitrary memory and has nothing to do with registers. You can allocate as much as you want (including e.g. bytearrays), until you run into the allocated stack limit. That limit can be arbitrary, and some languages even dynamically scale the stack. That you also have access to manual memory on the heap doesn’t matter. You can also do manual memory management in Rust if you want, as one has to do at times. |
|
It's not rocket science. If you are calling malloc/free to maintain your memory you're doing manual memory management.
> You can also do manual memory management in Rust
You can do Garbage Collection in C, it doesn't make it Garbage Collected language.
You're confusing default memory management with what's possible.
By your logic, Arena allocators can be used in many different languages, including GC ones like Java. So that means GC languages like Java are manually memory managed. Which is defeats the definition of it.