Comment by JackSlateur
5 hours ago
Are you not confusing GC (freeing memory) with the memory allocator ?
Memory allocator: tcmalloc, jemalloc, they are concerned with fetching (and releasing) pages of memory from the OS and allocating objects for the program
GC is only responsible for saying to the memory allocator "this object is no longer used"
(please stay focused on java)
>Are you not confusing GC (freeing memory) with the memory allocator ?
No, you're missing the fact that the allocation of memory and the GC go hand in hand, because you need it so for optimizations. They are designed together to cooperate in modern runtimes.
Please read up some more about Java and GCs. Memory allocation and GC are heavily intertwined.