Is it safe to use the c++ operator new in a kernel extension?
I'm porting a file system library written in c++ to MacOS X, and I'm
getting a kernel panic when it calls new after performing a series of
I/Os, so I'm trying to determine whether the call to new is the
problem, or if I trashed memory when performing my I/O.
The IOKIT kexts use "new" all over the place without any issues. Just make sure to check the value you get back to see if the "new" returned a valid pointer. If you're already doing that and still panic then something is corrupting your pointers somehow. William Kucharski kucharsk@mac.com _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.
participants (1)
-
William Kucharski