Closed
Bug 38996
Opened 24 years ago
Closed 24 years ago
New function PR_GetMemMapAlignment
Categories
(NSPR :: NSPR, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
4.1
People
(Reporter: wtc, Assigned: wtc)
References
Details
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 | ||
Comment 1•24 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
Closed: 24 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.1
You need to log in
before you can comment on or make changes to this bug.
Description
•