User:Trustable/Memory management
Appearance
This page should explain different techniques of Memory management in programming languages.
Manual memory management
[edit]E.g. malloc()
and free()
in C.
Cons:
- No protection of memory leaks
- No protection of use after free bugs
Tracing garbage collection
[edit]Used by:
- Java
- JavaScript
- Common Language Runtime
- Go
- many more
Cons:
- Runtime costs
Reference counting with tracing garbage collection
[edit]The tracing part is needed for cycle detection.
Used by:
Cons:
- Runtime costs
Reference counting with ownership
[edit]Used by:
Cons:
- Runtime costs