Removed the unused cache line size helper method
This commit is contained in:
parent
1a61c8d2d9
commit
b4af7cc5ef
|
@ -301,7 +301,6 @@ static const CGFloat kDestSeemOverlap = 2.0f; // the numbers of pixels to over
|
|||
+ (size_t)preferredByteAlignment {
|
||||
// https://github.com/path/FastImageCache#byte-alignment
|
||||
// A properly aligned bytes-per-row value must be a multiple of 8 pixels × bytes per pixel.
|
||||
// return [SDDeviceHelper cacheLineSize]; // Seems not the CPU cache line size
|
||||
return 32;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,5 @@
|
|||
|
||||
+ (NSUInteger)totalMemory;
|
||||
+ (NSUInteger)freeMemory;
|
||||
+ (size_t)cacheLineSize;
|
||||
|
||||
@end
|
||||
|
|
|
@ -30,18 +30,4 @@
|
|||
return vm_stat.free_count * page_size;
|
||||
}
|
||||
|
||||
+ (size_t)cacheLineSize {
|
||||
size_t size;
|
||||
sysctlbyname("hw.cachelinesize", NULL, &size, NULL, 0);
|
||||
char *info = malloc(size);
|
||||
sysctlbyname("hw.cachelinesize", info, &size, NULL, 0);
|
||||
if (strlen(info)) {
|
||||
// hardcode
|
||||
return 64;
|
||||
}
|
||||
char *end;
|
||||
long result = strtol(info, &end, 10);
|
||||
return result;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue