We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if (mp->auto_extend) { // 超过总内存限制 if (mp->alloc_mempool_size + total_needed_size > mp->max_mempool_size) { goto err_out; } // 问题1: mem_size_t add_mem_sz = mp->max_mempool_size - mp->mempool_size; // 如果空间足够则按 mempool_size 新增, 不足则分配剩下所有内存 add_mem_sz = add_mem_sz >= mp->mempool_size ? mp->mempool_size : add_mem_sz; if (!extend_memory_list(mp, add_mem_sz)) goto err_out; // 更新实际分配内存 mp->alloc_mempool_size += add_mem_sz; goto FIND_FREE_CHUNK; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: