I have created a project and use Instrument to watch the live bytes.
I’ve done the following:
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
char *byte = (char *)malloc(10000000);
}
The live bytes in Instruments was keep in 650KB.
The Instrument cannot observe the allocation of malloc methods?
Or apple doesn’t limit the size of this allocation?
Thanks!
If you never use the memory
mallocallocated, the compiler can optimize away the allocation completely.