Last active
August 29, 2015 14:07
-
-
Save aschepis/6e9b7fe9f71d5a64824f to your computer and use it in GitHub Desktop.
OSMalloc Tag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <mach/mach_types.h> | |
| #include <sys/systm.h> | |
| #include <libkern/OSMalloc.h> | |
| OSMallocTag tut_mtag = (OSMallocTag)NULL; | |
| kern_return_t network_filter_tutorial_start(kmod_info_t * ki, void *d); | |
| kern_return_t network_filter_tutorial_stop(kmod_info_t *ki, void *d); | |
| kern_return_t network_filter_tutorial_start(kmod_info_t * ki, void *d) { | |
| tut_mtag = OSMalloc_Tagalloc("NetworkFilterTutorial", OSMT_DEFAULT); | |
| return KERN_SUCCESS; | |
| } | |
| kern_return_t network_filter_tutorial_stop(kmod_info_t *ki, void *d) { | |
| OSMalloc_Tagfree(tut_mtag); | |
| return KERN_SUCCESS; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment