STL principle of memory allocation (to be supplemented)

Application memory is greater than 128, call a configurator malloc, for memory is less than 128, starting on the freelist to find otherwise go directly back to find application memory pool 20, enough for 20 to return 20, the first one back to the customer, and the rest Configuring freelist,
not enough 20 to apply for a direct return to the customer, not one, the memory pool remaining memory allocated to a reasonable freelist, then call 2 times + of malloc allocate the memory needed,
then apply to again call chunk_alloc and then if the application can not find an unused block of memory chunks from the freelist, apply to the calling chunk_alloc

Guess you like

Origin blog.csdn.net/weixin_34061042/article/details/90994807