New function PR_GetMemMapAlignment

RESOLVED FIXED in 4.1

Status

P3
normal
RESOLVED FIXED
19 years ago
19 years ago

People

(Reporter: wtc, Assigned: wtc)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

19 years ago
The offset argument to PR_MemMap must be
properly aligned.  The alignment is platform
dependent.  On Unix, the offset must be aligned
and sized to whole pages.  On Win32, however,
the offset must be a multiple of the "allocation
granularity" of the system, which is different
from the page size.  For example, on NT 4.0 x86,
the allocation granularity is 64K while the page
size is 4K.

We should add a new function PR_GetMemMapAlignment
to return the alignment of the offset argument to
PR_MemMap.
(Assignee)

Updated

19 years ago
Blocks: 34920
(Assignee)

Comment 1

19 years ago
Added PR_GetMemMapAlignment().

On Unix, it returns PR_GetPageSize().

On Win32, it calls the Win32 GetSystemInfo() function
and returns the allocation granularity.

On other platforms, it fails with PR_NOT_IMPLEMENTED_ERROR.

Modified files: prio.h, _beos.h, _macos.h, _os2.h, _unixos.h,
_win16.h, _win95.h, _winnt.h, primpl.h, prmmap.c, bmmap.c,
macio.c, os2misc.c, ntmisc.c, w16fmem.c
Status: NEW → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.1
You need to log in before you can comment on or make changes to this bug.