Phil Carmody on Sat, 27 Jan 2007 02:21:33 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: GMP build on OSX |
--- Vincent Lefevre <vincent@vinc17.org> wrote: > On 2007-01-26 17:03:16 +0100, Bill Allombert wrote: > > Probably neither (directly). Blanking pages is the duty of the > > kernel and occurs when memory is requested. It is probably caused by > > the malloc library (normally part of the C library) . Maybe you > > could try alternative malloc libraries or alternative OS. > > Page-zeroing should be done by the kernel for obvious security reasons. > This means that whatever C library is used, pages will be zeroed. So, > changing the malloc library probably won't have any effect, unless the > default library does reads/writes or something else to make sure that > the memory is really allocated (and not just address space like under > Linux). But I don't know what the policy is under Mac OS X and I've > never done any test about that. However, so far the kernel has zeroed 10^13 bytes of memory for my single process. Given that the process only has a memory footprint of ~150MB, that's 9,999,850MB of unnecessary zeroing of memory, causing a 20% performance hit. When my processor goes idle, I'll try the non-GMP kernel, and see if it makes any difference. I'll also see if alloca makes a difference in GMP. Phil () ASCII ribbon campaign () Hopeless ribbon campaign /\ against HTML mail /\ against gratuitous bloodshed [stolen with permission from Daniel B. Cristofani] ____________________________________________________________________________________ Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. http://farechase.yahoo.com/promo-generic-14795097