Last Comment Bug 699101 - NO_MAC_JEMALLOC can't work on 10.5, so display a warning when it's specified
: NO_MAC_JEMALLOC can't work on 10.5, so display a warning when it's specified
Status: RESOLVED FIXED
[qa-]
:
Product: Core
Classification: Components
Component: Memory Allocator (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: mozilla10
Assigned To: Justin Lebar (not reading bugmail)
:
Mentors:
Depends on:
Blocks: 694335
  Show dependency treegraph
 
Reported: 2011-11-02 09:04 PDT by Justin Lebar (not reading bugmail)
Modified: 2011-12-29 20:32 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed


Attachments
Patch? v1 (1.71 KB, patch)
2011-11-02 09:25 PDT, Justin Lebar (not reading bugmail)
no flags Details | Diff | Review
Patch v2 (2.14 KB, patch)
2011-11-02 14:28 PDT, Justin Lebar (not reading bugmail)
khuey: review+
Details | Diff | Review

Description Justin Lebar (not reading bugmail) 2011-11-02 09:04:05 PDT
Patch in a moment.
Comment 1 Justin Lebar (not reading bugmail) 2011-11-02 09:17:55 PDT
 * memalign is unavailable on Leopard, so we can't dynamically do this there.
 * However, we don't use jemalloc on Leopard, so we can ignore this.
 */
#if defined(MOZ_MEMORY_DARWIN) && !defined(__i386__)

So now we *are* using jemalloc on Leopard.

When does MEMALIGN get called?  If MEMALIGN is called and we're not using jemalloc, what the heck are we supposed to do?  Crash?
Comment 2 Justin Lebar (not reading bugmail) 2011-11-02 09:19:11 PDT
I should have given more context in comment 1.  It's

#if defined(MOZ_MEMORY_DARWIN) && !defined(__i386__)
#define DARWIN_ONLY(A) if (!osx_use_jemalloc) { A; }
#else
#define DARWIN_ONLY(A)
#endif
Comment 3 Justin Lebar (not reading bugmail) 2011-11-02 09:25:40 PDT
Created attachment 571355 [details] [diff] [review]
Patch? v1
Comment 4 Justin Lebar (not reading bugmail) 2011-11-02 14:24:14 PDT
So, memalign is apparently called on 10.5.  I guess this means that we can't dynamically turn off jemalloc there.  Not a huge deal; this is only for testing, anyway.

I'll post a patch fixing the comment.
Comment 5 Justin Lebar (not reading bugmail) 2011-11-02 14:28:57 PDT
Created attachment 571460 [details] [diff] [review]
Patch v2
Comment 6 Justin Lebar (not reading bugmail) 2011-11-04 08:47:49 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/8a385ef6f650
Comment 7 Matt Brubeck (:mbrubeck) 2011-11-04 11:32:27 PDT
https://hg.mozilla.org/mozilla-central/rev/8a385ef6f650
Comment 8 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2011-12-28 14:27:59 PST
Is there a testcase QA can use to verify this fix?
Comment 9 Justin Lebar (not reading bugmail) 2011-12-29 20:24:13 PST
(In reply to Anthony Hughes, Mozilla QA (irc: ashughes) from comment #8)
> Is there a testcase QA can use to verify this fix?

No.

Note You need to log in before you can comment on or make changes to this bug.