对大多数收集器实现而言,分配子系统持有一个自由堆内存池,应用程序通过分配对象使用该池,然后由收集器通过清理来补充该池。
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.
mempool_alloc用来分配对象;如果内存池分配器无法提供内存,那么就可以用预分配的池。
Mempool_alloc is for allocating objects; if the mempool allocator fails to provide memory, then the pre-allocation pool will be used.
应用推荐