4 ms·
> Without knowing too much about intricacies, wouldn't it be beneficial to have system (kernel) provided gc? Isn't it already there? You allocate memory with m
by Zababa 5y ago
> Without knowing too much about intricacies, wouldn't it be beneficial to have system (kernel) provided gc?
Isn't it already there? You allocate memory with malloc(), free it with free() and the system takes care of fragmentation and stuff like that. The GCs that we are used to are usually one level higher, but I imagine that you could also go one level lower, where memory managment is really manual. For exemple, allocating all memory at the start of the program and doing everything yourself.
- dragontamer 5y agoglibc isn't anywhere close to the kernel. glibc (where malloc() / free() live) is 100% userspace.
- kgeist 5y agoWhen a process dies, OS automatically frees all resources held by the process. You can view it as a form of GC.