修改栈空间大小代码如下:
+(NSThread *)createThreadWithTarget:(id)target selector:(SEL)selector
object:(id)argument stackSize:(NSUInteger)size {
if( (size % 4096) != 0) {
return nil;
}
NSThread *t = [[NSThread alloc] initWithTarget:target
selector: selector object:argument];
t.stackSize = size;
return t;
}
网友评论