Index: src/OFConstantString.m ================================================================== --- src/OFConstantString.m +++ src/OFConstantString.m @@ -59,33 +59,33 @@ { [self doesNotRecognizeSelector: _cmd]; abort(); } -- (void*)allocMemoryWithSize: (size_t)itemSize +- (void*)allocMemoryWithSize: (size_t)size count: (size_t)count { [self doesNotRecognizeSelector: _cmd]; abort(); } -- (void*)resizeMemory: (void*)ptr +- (void*)resizeMemory: (void*)pointer + size: (size_t)size +{ + [self doesNotRecognizeSelector: _cmd]; + abort(); +} + +- (void*)resizeMemory: (void*)pointer size: (size_t)size + count: (size_t)count { [self doesNotRecognizeSelector: _cmd]; abort(); } -- (void*)resizeMemory: (void*)ptr - size: (size_t)nitems - count: (size_t)size -{ - [self doesNotRecognizeSelector: _cmd]; - abort(); -} - -- (void)freeMemory: (void*)ptr +- (void)freeMemory: (void*)pointer { [self doesNotRecognizeSelector: _cmd]; abort(); } @@ -188,26 +188,26 @@ { [self doesNotRecognizeSelector: _cmd]; abort(); } -- (void*)resizeMemory: (void*)ptr +- (void*)resizeMemory: (void*)pointer size: (size_t)size { [self doesNotRecognizeSelector: _cmd]; abort(); } -- (void*)resizeMemory: (void*)ptr +- (void*)resizeMemory: (void*)pointer size: (size_t)size count: (size_t)count { [self doesNotRecognizeSelector: _cmd]; abort(); } -- (void)freeMemory: (void*)ptr +- (void)freeMemory: (void*)pointer { [self doesNotRecognizeSelector: _cmd]; abort(); } Index: src/runtime/class.m ================================================================== --- src/runtime/class.m +++ src/runtime/class.m @@ -309,16 +309,12 @@ setup_class(cls); if (cls->info & OBJC_CLASS_INFO_SETUP) call_load(cls); else { - if (load_queue == NULL) - load_queue = malloc(sizeof(Class)); - else - load_queue = realloc(load_queue, - sizeof(Class) * - (load_queue_cnt + 1)); + load_queue = realloc(load_queue, + sizeof(Class) * (load_queue_cnt + 1)); if (load_queue == NULL) OBJC_ERROR("Not enough memory for load " "queue!"); Index: src/runtime/static-instances.m ================================================================== --- src/runtime/static-instances.m +++ src/runtime/static-instances.m @@ -77,21 +77,17 @@ for (instances = (*si)->instances; *instances != nil; instances++) object_setClass(*instances, cls); } else { - if (static_instances == NULL) - static_instances = malloc(sizeof( - struct objc_abi_static_instances*)); - else - static_instances = realloc(static_instances, - sizeof(struct objc_abi_static_instances*) * - (static_instances_cnt + 1)); + static_instances = realloc(static_instances, + sizeof(struct objc_abi_static_instances*) * + (static_instances_cnt + 1)); if (static_instances == NULL) OBJC_ERROR("Not enough memory for list of " "static instances!"); static_instances[static_instances_cnt++] = *si; } } }