Closed Bug 1003230 Opened 7 years ago Closed 7 years ago

Functions for memory mapping files should use existing page size information


(Core :: JavaScript: GC, defect)

Not set





(Reporter: jonco, Assigned: jonco)



(2 files)

Suggested in bug 988486 comment 9.  AllocateMappedContent() and DeallocateMappedContent() re-fetch the system page size, but we have this information already available.

The knock on effect is that we will need to take a JSRuntime* parameter in some API functions that call into these.
I previously factored this functionality out into its own class, but thinking about it some more, I don't think that was the best thing to do.

The state here (page size etc) depends only on the host OS and will always be the same for any instance of the class.  So I think it makes more sense to have it as global variables.  That means that we can implement this as just a set of functions that don't need any context to call them, which simpilifies things somewhat.
Assignee: nobody → jcoppeard
Attachment #8453769 - Flags: review?(sphink)
Now we can just use the existing page size information here.
Attachment #8453770 - Flags: review?(sphink)
Comment on attachment 8453769 [details] [diff] [review]
1 - Refactor page allocation functionality

Review of attachment 8453769 [details] [diff] [review]:

Good stuff
Attachment #8453769 - Flags: review?(sphink) → review+
Attachment #8453770 - Flags: review?(sphink) → review+
You need to log in before you can comment on or make changes to this bug.