Skip to content
New issue

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

merge_free_chunk报错 #4

Closed
791136190 opened this issue May 24, 2018 · 3 comments
Closed

merge_free_chunk报错 #4

791136190 opened this issue May 24, 2018 · 3 comments

Comments

@791136190
Copy link

791136190 commented May 24, 2018

使用自动扩展后,merge_free_chunk会报错,while ((char *)p0 >= mm->start && p0->is_free),从调试来看,内存访问都是无法获取的状态

@userpro
Copy link
Owner

userpro commented May 25, 2018

已更新 谢大佬指正

@userpro userpro closed this as completed May 27, 2018
@791136190
Copy link
Author

最新的资源,启用自动扩展后,如果初始化指定的块小于后面某次申请时的大小,你的if (mp->mem_pool_size - mm->alloc_mem < total_size)判断+自动扩展会导致系统内存全被申请掉。这里应该做适当的规避。

@userpro
Copy link
Owner

userpro commented May 28, 2018

已更新

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants