Closed Bug 501760 Opened 15 years ago Closed 15 years ago

mmap with MAP_ANONYMOUS doesn't work on Symbian

Categories

(Core :: JavaScript Engine, defect)

All
Symbian
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: m_kato, Assigned: m_kato)

Details

Attachments

(2 files, 1 obsolete file)

OpenC (http://forum.nokia.com/openc) provides mmap() function, but this doesn't support MAP_ANONYMOUS.
So NewGCChunk() on symbian is always failure.  So don't use GC_USE_MMAP on Symbian (or use RChunk)
Attached patch patch v1Splinter Review
Attachment #386689 - Flags: review?(jim)
Attachment #386689 - Flags: review?(jim) → review-
Comment on attachment 386689 [details] [diff] [review]
patch v1

One general comment: this patch also includes some changes to the JS_{EXTERN,EXPORT}_{API,DATA} macros; those should be a separate patch.  It's very helpful to have separate bugs for separate changes.  (Those changes look good, by the way; I will r+ them if you r? me.)

In the long run, we should be replacing these #if PLATFORM/#elif/... chains with configure.in tests.  If you're interested, I'd happily review such a patch.  But that is a bit more work.  Let me attach an alternative patch that seems clearer.
Could you give this a try and see if it works as well as the fix you proposed?  If we can't autoconfiscate code like this,, I'd like to at least have it evolve more towards a straightforward platform-by-platform chain of #ifs.
(In reply to comment #3)
> Created an attachment (id=387024) [details]
> Don't use posix_memalign or mmap on Symbian.
> 
> Could you give this a try and see if it works as well as the fix you proposed? 
> If we can't autoconfiscate code like this,, I'd like to at least have it evolve
> more towards a straightforward platform-by-platform chain of #ifs.

Great.  No problem.
Attachment #387024 - Flags: review?(doug.turner)
Revised based on IRC discussion.

When we're using jemalloc (indicated by MOZ_MEMORY being #defined), that does provide posix_memalign, so the comment in the patch is wrong if we're using jemalloc on Symbian.  However, it turns out that the right way to recognize that posix_memalign is available isn't as was suggested in IRC; the original patch should use it just fine.

Thus: comment fixed; substance unchanged.
Attachment #387024 - Attachment is obsolete: true
Attachment #387728 - Flags: review?(bugmail)
Attachment #387024 - Flags: review?(doug.turner)
Attachment #387728 - Flags: review?(bugmail) → review+
http://hg.mozilla.org/mozilla-central/rev/603c6cb5be9a
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: