Hi, The code is like:
- (void)myMethod { ......... while (flag) { UInt32 temp; ..... and lot of other ints etc. if (someCondition == 1) { UInt8 *buff = (UInt8*)calloc(1, sizeof(aStruct)); if (someOtherCondition == 1) { [self addPointerToATree:buff]; } else free(buff); } } } The while loop runs very rigorously without having much delay in it. Memory for buff is only needed when certain condition is met. I have seen that even when this condition is not met and no memory is allocated, the VM keeps growing steadily as seen in Activity Monitor. So the only thing contributing to it would be the various ints etc. But the app is GC enabled (required), so the VM size should reset to some level every few seconds, but doesn't. The loop does many thousands of iterations per second. Any idea on how to limit this usage? Shall help. I have a auto release pool drained at the end of every iteration in a loop in some other method but that doesn't seem to have much effect. Wishes, Nick _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com