At 8:03 PM +0200 5/27/03, Leopold Toetsch wrote:
Some additional remarks:

The "memset" in smallobject.c is not necessary on Linux. mmap() (which
obviously gets called for memalign - at least for this arena size)
does clear the memory.  We need some tests, from which size memory is
cleard for malloc and memalign.
I tossed the memset for now and saved ~450.000 L2-misses or ~0.2 s.

While I didn't see any memsets in smallobject.c, I'm really, *really* uncomfortable counting on implied behavior. There's no reason that mmap has to return zeroed memory, and none of the man pages I have claim that it does. While it *probably* does, it certainly doesn't have to, and I'd definitely not count that it does, nor that it's actually called implicitly. I've been burned by stuff like that before.


Having said that, if we can actually guarantee certain behaviours, I'm all for conditional code to exploit them.
--
Dan


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to