Re: FreeBSD 9.1 excessive memory allocations [SOLVED]

看板FB_stable作者時間12年前 (2013/04/27 13:33), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串6/6 (看更多)
--===============8773076425241777101== Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Quoth Unga <unga888@yahoo.com>: > > > I think you may be reading too much into the malloc manpage.ꀠWhen it > > mentions the use of per-thread small-object caches to avoid locking it's > > talking about performance, not thread safety.ꀠAllocations of all sizes > > are thread-safe, the library just assumes that huge allocations are rare > > enough that it doesn't use extra per-thread resources to avoid locking > > for them, it just uses locking for huge blocks. > > Good to note all allocations are thread safe in FreeBSD. Is it by some > standard that malloc should be thread safe regardless the OS (BSDs, > Linux, Windows, Android, etc)? POSIX (well, SUSv4 at least) says that malloc and free must be threadsafe. Note that Windows is not a POSIX system, though I belive malloc is also always threadsafe on Windows. Ben --===============8773076425241777101== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" --===============8773076425241777101==--
文章代碼(AID): #1HUsCQ0T (FB_stable)
討論串 (同標題文章)
文章代碼(AID): #1HUsCQ0T (FB_stable)