1*c54f35caSApple OSS Distributions// To apply, at the top of xnu.git: 2*c54f35caSApple OSS Distributions// $ spatch --max-width=80 --use-gitgrep --in-place --include-headers --sp-file tools/cocci/zalloc.cocci -dir . 3*c54f35caSApple OSS Distributions// 4*c54f35caSApple OSS Distributions// This might need to be run several times 5*c54f35caSApple OSS Distributions 6*c54f35caSApple OSS Distributions@ using "zalloc.iso" @ 7*c54f35caSApple OSS Distributionsexpression D, E, F, G; 8*c54f35caSApple OSS Distributionstype T; 9*c54f35caSApple OSS Distributionsidentifier V; 10*c54f35caSApple OSS Distributions@@ 11*c54f35caSApple OSS Distributions( 12*c54f35caSApple OSS Distributions- kheap_alloc(KHEAP_DATA_BUFFERS, E, F) 13*c54f35caSApple OSS Distributions+ kalloc_data(E, F) 14*c54f35caSApple OSS Distributions| 15*c54f35caSApple OSS Distributions- (T)kheap_alloc(KHEAP_DATA_BUFFERS, E, F) 16*c54f35caSApple OSS Distributions+ (T)kalloc_data(E, F) 17*c54f35caSApple OSS Distributions| 18*c54f35caSApple OSS Distributions- kheap_alloc_tag(KHEAP_DATA_BUFFERS, E, F, G) 19*c54f35caSApple OSS Distributions+ kalloc_data_tag(E, F, G) 20*c54f35caSApple OSS Distributions| 21*c54f35caSApple OSS Distributions- kheap_free(KHEAP_DATA_BUFFERS, E, F) 22*c54f35caSApple OSS Distributions+ kfree_data(E, F) 23*c54f35caSApple OSS Distributions| 24*c54f35caSApple OSS Distributions- kheap_free_addr(KHEAP_DATA_BUFFERS, E) 25*c54f35caSApple OSS Distributions+ kfree_data_addr(E) 26*c54f35caSApple OSS Distributions) 27*c54f35caSApple OSS Distributions 28*c54f35caSApple OSS Distributions// vim:ft=diff: 29