Posts

Post not yet marked as solved
17 Replies
8.9k Views
is there any public API or Method to get resident size of current process of game like Debug Gauges to Monitor Memory?As far as i know someone use XCode instrument -> show the Debuger navigator -> Memory to get it, before i have found some API to get itfrom internet,but a big differece bettween with the result of XCode Debuger navigator .the first method like this: struct mach_task_basic_info info; mach_msg_type_number_t count = MACH_TASK_BASIC_INFO_COUNT; if (task_info(mach_task_self(), MACH_TASK_BASIC_INFO, (task_info_t)& info, &count) == KERN_SUCCESS) { int32_t _pss = (int32_t)info.resident_size / (1024 * 1024); }another method like this: task_vm_info_data_t vmInfo; mach_msg_type_number_t count = TASK_VM_INFO_COUNT; kern_return_t kernelReturn = task_info(mach_task_self(), TASK_VM_INFO, (task_info_t) &vmInfo, &count); if(kernelReturn == KERN_SUCCESS) { int32_t _pss = (int32_t) vmInfo.phys_footprint / (1024 * 1024); }someone discuss:https://github.com/aozhimin/iOS-Monitor-Platform/issues/5a big differnece bettween the result of the first method and the result of XCode Debug navigator instrument, info.resident_size will not increase When the memory is allocated continuously,but xcode Debug navigator will increase.but a little difference bettween the result of the second method and the result of XCode Debug navigator instrument when use game test,but application app will same with it. so i want to know how XCode Debug navigator to calculate Memory or how to get resident size of current process more precise,any idea will help me,thanks in advance!
Posted
by aimsgmiss.
Last updated
.
Post not yet marked as solved
2 Replies
602 Views
As far As i know, i found lots of developer's question about how to get current app network traffic in this forums.but unclear response from forums. getifaddrs function could get network traffic of entire device. is there any possible to get current app network traffic from this function. we do not use http protocol ,such as url loading system, NSURlSession and son on, TCP protocol monitor current app network traffic.we cannot use a series of functions about socket program directly,such As send,socket,recv. maybe hook send of c language function for getting network traffic , fishhook of facebook was successed,but the dlsym,dlopen function were rejected by app review team ,so can not be upload to appstore.there was non public API to get single app network traffic.just like iphone setting. so what can i do for this ?thanks in advance!
Posted
by aimsgmiss.
Last updated
.
Post not yet marked as solved
1 Replies
937 Views
I want to use dlsym() ,dlopen() function to hook c series function for collecting performance of iOS game. but these functions may be rejected by app review team. Not using for hot code push. Thank you in advance!
Posted
by aimsgmiss.
Last updated
.