. . . "In particular, the optimal heap size is a function of both the garbage collection algorithm used and the total amount of memory the operating system is willing to allocate to the process." .