Closed Bug 622425 Opened 14 years ago Closed 14 years ago

implement PR_GetPhysicalMemorySize on OpenBSD

Categories

(NSPR :: NSPR, defect, P2)

All
OpenBSD
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gaston, Assigned: gaston)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.9.1.15) Gecko/20101029 Firefox/3.5.15
Build Identifier: 

in nsprpub/pr/src/misc/prsystem.c PR_GetPhysicalMemorySize() returns 0 on OpenBSD whereas it could use NetBSD's codepath.

Reproducible: Always
Patch fixing the issue.
Assignee: nobody → landry
Component: Embedding: GRE Core → NSPR
Product: Core → NSPR
QA Contact: gre → nspr
Version: unspecified → 4.9
Attachment #500695 - Flags: review?(nelson)
Comment on attachment 500695 [details] [diff] [review]
Proposed fix, works here

I have no objections ... if it is correct.
Attachment #500695 - Flags: review?(nelson) → review+
As said, i've tested it here with the following testcase on amd64 :

#include <nspr/prtypes.h>
#include <nspr/prsystem.h>
#include <stdio.h>

int main()
{
        printf ("%llu memory\n",PR_GetPhysicalMemorySize());
}

previously, it returned 0, now it returns the correct number of available bytes (4Gb in my case)
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P2
Target Milestone: --- → 4.8.8
Version: 4.9 → other
Patch checked in on the NSPR trunk (NSPR 4.8.8).

Checking in prsystem.c;
/cvsroot/mozilla/nsprpub/pr/src/misc/prsystem.c,v  <--  prsystem.c
new revision: 3.35; previous revision: 3.34
done
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Blocks: openbsdmeta
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: