NO_MAC_JEMALLOC can't work on 10.5, so display a warning when it's specified

RESOLVED FIXED in Firefox 10

Status

()

Core
Memory Allocator
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Justin Lebar (not reading bugmail), Assigned: Justin Lebar (not reading bugmail))

Tracking

unspecified
mozilla10
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(firefox10 fixed)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
Patch in a moment.
(Assignee)

Updated

6 years ago
Blocks: 694335
(Assignee)

Comment 1

6 years ago
 * 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?
(Assignee)

Comment 2

6 years ago
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
(Assignee)

Comment 3

6 years ago
Created attachment 571355 [details] [diff] [review]
Patch? v1
(Assignee)

Comment 4

6 years ago
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.
(Assignee)

Comment 5

6 years ago
Created attachment 571460 [details] [diff] [review]
Patch v2
Attachment #571460 - Flags: review?(khuey)
(Assignee)

Updated

6 years ago
Attachment #571355 - Attachment is obsolete: true
Attachment #571460 - Flags: review?(khuey) → review+
Assignee: nobody → justin.lebar+bug
Status: NEW → ASSIGNED
(Assignee)

Updated

6 years ago
Attachment #571460 - Attachment description: Patch v1 → Patch v2
(Assignee)

Updated

6 years ago
Summary: jemalloc's DARWIN_ONLY macro doesn't work on i386, breaking NO_MAC_JEMALLOC → NO_MAC_JEMALLOC can't work on 10.5, so display a warning when it's specified
(Assignee)

Comment 6

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/8a385ef6f650
status-firefox10: --- → fixed
https://hg.mozilla.org/mozilla-central/rev/8a385ef6f650
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
Is there a testcase QA can use to verify this fix?
Whiteboard: [qa?]
(Assignee)

Comment 9

6 years ago
(In reply to Anthony Hughes, Mozilla QA (irc: ashughes) from comment #8)
> Is there a testcase QA can use to verify this fix?

No.
Whiteboard: [qa?] → [qa-]
You need to log in before you can comment on or make changes to this bug.