当我使用“vmmap”(或 Instruments 中的分配工具)时,其中一行输出是“映射文件”。如何以编程方式获取此号码?
vmmap 输出:
REGION TYPE [ VIRTUAL]
=========== [ =======]
ATS (font support) [ 32.9M]
CG backing stores [ 110.1M]
CG raster data [ 64K]
CG shared images [ 2284K]
Carbon [ 3444K]
CoreGraphics [ 8K]
IOKit [ 512.8M]
MALLOC [ 264.7M]
Memory tag=240 [ 4K]
Memory tag=242 [ 12K]
Memory tag=243 [ 12K]
Memory tag=249 [ 192K]
OpenGL GLSL [ 3072K]
STACK GUARD [ 56.5M]
Stack [ 57.4M]
VM_ALLOCATE [ 827.7M]
__DATA [ 23.3M]
__DATA/__OBJC [ 12K]
__IMAGE [ 1240K]
__IMPORT [ 732K]
__LINKEDIT [ 80.1M]
__OBJC [ 1148K]
__OBJC/__DATA [ 12K]
__PAGEZERO [ 4K]
__TEXT [ 232.2M]
__UNICODE [ 536K]
mapped file [ 38.9M]
shared memory [ 580K]
shared pmap [ 7440K]