new doing a zero memory ?
21 Dec
2001
21 Dec
'01
4:59 p.m.
Hi, please tell me if this is not the right list. I've been looking to know if the new in an IOKit of an object that does not inherit from OSObject. So I found in the sources (OSRuntime.cpp): 1 :void * operator new( size_t size) 2 :{ 3 : void * result; 4 : 5 : result = (void *) kern_os_malloc( size); 6 : if( result) 7 : bzero( result, size); 8 : return( result); 9 :} At line 7, it seems to do a zero memory. Is this not causing performance drop ? I found that because some of our old code rely on a new operator that is initializing the data. Is this initialization really necessary ? Franics
8721
Age (days ago)
8721
Last active (days ago)
0 comments
1 participants
participants (1)
-
Francis Bouchard