diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-02 21:01:38 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-02 21:01:38 +0100 |
commit | f7d30133221896638f7bf4f66c504255c4b14f48 (patch) | |
tree | 5f3e07a049f388a3a309a615b8884318f6668a98 /nsprpub/pr/src/memory/prseg.c | |
parent | 26b297510a11758727438df4669357a2a2bc42ce (diff) | |
download | UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.gz UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.lz UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.xz UXP-f7d30133221896638f7bf4f66c504255c4b14f48.zip |
Issue #1338 - Part 1: Update NSPR to 4.24
Diffstat (limited to 'nsprpub/pr/src/memory/prseg.c')
-rw-r--r-- | nsprpub/pr/src/memory/prseg.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/nsprpub/pr/src/memory/prseg.c b/nsprpub/pr/src/memory/prseg.c index ecad1d0ca..0b70f2d4e 100644 --- a/nsprpub/pr/src/memory/prseg.c +++ b/nsprpub/pr/src/memory/prseg.c @@ -18,7 +18,7 @@ void _PR_InitSegs(void) void _PR_InitSegs(void) { - _PR_MD_INIT_SEGS(); + _PR_MD_INIT_SEGS(); } /* @@ -31,20 +31,20 @@ PRSegment* _PR_NewSegment(PRUint32 size, void *vaddr) { PRSegment *seg; - /* calloc the data structure for the segment */ + /* calloc the data structure for the segment */ seg = PR_NEWZAP(PRSegment); if (seg) { - size = ((size + _pr_pageSize - 1) >> _pr_pageShift) << _pr_pageShift; - /* - ** Now, allocate the actual segment memory (or map under some OS) - ** The OS specific code decides from where or how to allocate memory. - */ - if (_PR_MD_ALLOC_SEGMENT(seg, size, vaddr) != PR_SUCCESS) { - PR_DELETE(seg); - return NULL; - } - } + size = ((size + _pr_pageSize - 1) >> _pr_pageShift) << _pr_pageShift; + /* + ** Now, allocate the actual segment memory (or map under some OS) + ** The OS specific code decides from where or how to allocate memory. + */ + if (_PR_MD_ALLOC_SEGMENT(seg, size, vaddr) != PR_SUCCESS) { + PR_DELETE(seg); + return NULL; + } + } return seg; } @@ -54,7 +54,7 @@ PRSegment* _PR_NewSegment(PRUint32 size, void *vaddr) */ void _PR_DestroySegment(PRSegment *seg) { - _PR_MD_FREE_SEGMENT(seg); + _PR_MD_FREE_SEGMENT(seg); PR_DELETE(seg); } |