Let's make this application slightly more realistic by forcing the garbage-collector subsystem to be active while TaskHandler code is running. Listing 7 shows this GCStressThread class.
我们使此应用程序稍微真实一些,在运行TaskHandler代码时激活垃圾收集器子系统。
For most collector implementations, the allocation subsystem keeps a pool of free heap memory, consumed by the application through allocating objects and replenished by the collector through sweeping.
对大多数收集器实现而言,分配子系统持有一个自由堆内存池,应用程序通过分配对象使用该池,然后由收集器通过清理来补充该池。
应用推荐