2017-04-12 111 views

回答

1

日志消息似乎来自

libmalloc-53.1.1 /src/malloc.c

作为源代码是可用here 在行#567 - 或文本至少搜索“记录的malloc(但不是V M”。

malloc_printf(ASL_LEVEL_INFO, "recording malloc (but not VM allocation) stacks to disk using standard recorder\n"); 

关于记录环境中,应该对Apple documentation看看。

如果你担心日志消息,我指的是行内注释源:

// Set up stack logging as early as possible to catch all ensuing VM allocations, 
// including those from _malloc_printf and malloc zone setup. Make sure to set 
// __syscall_logger after this, because prepare_to_log_stacks() itself makes VM 
// allocations that we aren't prepared to log yet. 

所以我想你应该忽略它,除非你想调试内存分配。

为了设置/取消malloc的调试环境,从项目工具栏中选择编辑计划...并进入诊断面板。

XCode Scheme Panel

+0

我还没有启用任何环境变量。如何禁用此日志? – iSwift

+0

在您的XCode项目工具栏中,从下拉菜单中输入* Edit Scheme ... *,选择* Diagnostics *面板并检查内存管理选项。 – lookaji

相关问题