From: Tim R. <ti...@pr...> - 2011-04-27 23:55:39
|
Michael Plante wrote: > Tim Roberts wrote: >>> Windows does not use the zero-page technique. > I'm not sure this is true. It might be more accurate to say that the C > Runtime Library doesn't make any assumptions about the page. You are exactly right -- my statement was too broad. The Windows kernel certainly uses the zero-page copy-on-write concept, but the CRT does not assume it. The whole zero-page thing can only help calloc if the allocation is large enough to require whole pages. Most libusb allocations are for structures, which are small. Such allocations will be sharing a page with other heap residents, so it has to do a memset. -- Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |