【问题标题】:Why this tcmalloc error SbrkSysAllocator failed happen?为什么会发生这个 tcmalloc 错误 SbrkSysAllocator failed ?
【发布时间】:2012-04-24 09:17:33
【问题描述】:

我在我的 c++ 程序中使用 google-perftools 的 tcmalloc_minimal 作为默认内存分配器。它打印出这个信息:

src/system-alloc.cc:427] SbrkSysAllocator failed 

程序继续运行。有关系吗?

【问题讨论】:

标签: memory memory-management memory-leaks tcmalloc google-perftools


【解决方案1】:

默认情况下,tcmalloc 使用 sbrk 从内核中获取内存。 如果内存映射发生冲突,sbrk 调用可能会失败,然后 tcmalloc 回退到纯 mmap。 这是生成消息的时刻。

没有什么可担心的(只要您没有耗尽地址空间)。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-06-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-14
    • 2017-07-20
    • 1970-01-01
    相关资源
    最近更新 更多