Closed Bug 1403843 Opened 7 years ago Closed 7 years ago

Make more sizes build-time rather than run-time

Categories

(Core :: Memory Allocator, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: glandium, Assigned: glandium)

Details

Attachments

(2 files)

No description provided.
I don't understand the point of the second patch. Can we just always use static sizes, and get rid of MALLOC_STATIC_SIZES entirely?
Flags: needinfo?(mh+mozilla)
We can't get rid of it, because, as said in the first patch commit message, there are platforms with a non fixed page size (it can be 4K, 16K or 64K on the same platform, depending how the kernel is configured).
Flags: needinfo?(mh+mozilla)
Comment on attachment 8913081 [details] Bug 1403843 - Make quantum, small and chunk sizes always static. https://reviewboard.mozilla.org/r/184498/#review189952 r=me if you rename MALLOC_STATIC_SIZES as MALLOC_STATIC_PAGESIZE.
Attachment #8913081 - Flags: review?(n.nethercote) → review+
Comment on attachment 8913082 [details] Bug 1403843 - Disable static sizes on debug builds. https://reviewboard.mozilla.org/r/184500/#review189956 ::: memory/build/mozjemalloc.cpp:389 (Diff revision 1) > > /* > * When MALLOC_STATIC_SIZES is defined most of the parameters > * controlling the malloc behavior are defined as compile-time constants > * for best performance and cannot be altered at runtime. > */ This comment is now wrong -- it's not most of the parameters, and it's not really about performance. I think it can be just removed, and that should be done in the previous patch. ::: memory/build/mozjemalloc.cpp:390 (Diff revision 1) > /* > * When MALLOC_STATIC_SIZES is defined most of the parameters > * controlling the malloc behavior are defined as compile-time constants > * for best performance and cannot be altered at runtime. > */ > +#ifndef MOZ_DEBUG Is the point of this to ensure we have test coverage for the non-static-pagesize case? If so, please add a comment to that effect.
Attachment #8913082 - Flags: review?(n.nethercote) → review+
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/e292482fdbe7 Make quantum, small and chunk sizes always static. r=njn https://hg.mozilla.org/integration/autoland/rev/c538d5d2d2c2 Disable static sizes on debug builds. r=njn
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: