IPhone dev - why does it use 8MB?

Even when I just use a Window-based application template that does nothing, the tools (activity monitor) say that my application process uses 8.14MB Real Memory ! Even with this method:

void report_memory(void) {
    struct task_basic_info info;
    mach_msg_type_number_t size = sizeof(info);
    kern_return_t kerr = task_info(mach_task_self(),
                                   TASK_BASIC_INFO,
                                   (task_info_t)&info,
                                   &size);
    if( kerr == KERN_SUCCESS ) {
        NSLog(@"Memory in use (in bytes): %u", info.resident_size);
    } else {
        NSLog(@"Error with task_info(): %s", mach_error_string(kerr));
    }
}

Its still ~ 8.14 MB! So the tools seem to be the right ones, but why does UIWindow take up so much memory?

+5
source share
1 answer

, Objective-C, , UIWindow. , , iPhone OS , , (, , ).

+2

All Articles