Closed
Bug 3410
Opened 26 years ago
Closed 26 years ago
Memory leak on PR_Read
Categories
(NSPR :: NSPR, defect, P1)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: sfraser_bugs, Assigned: srinivas)
Details
There is a serious memory leak in NSPR, which causes us to leak a 32 byte
pointer on every PR_Read, as far as I can tell.
macio.c, ReadWriteProc() allocates a new UPP thus:
pbAsync.pb.ioParam.ioCompletion =
NewIOCompletionProc((ProcPtr)&AsyncIOCompletion);
and never calls DisposeRoutine descriptor.
This is causing heap fragmentation, which has other serious side-effects
(like GWorld allocations fail).
Reporter | ||
Comment 1•26 years ago
|
||
This is a Mac only bug, BTW.
Updated•26 years ago
|
Severity: major → critical
Comment 2•26 years ago
|
||
Note: the tree is kept close waiting for this bug and a couple of other ones to
be fixed.
Updated•26 years ago
|
Assignee: wtc → srinivas
Comment 3•26 years ago
|
||
New NSPR bugs should be assigned to the module
owner Srinivas.
Comment 4•26 years ago
|
||
A suggestion: since the leak happens often enough to cause a big fragmentation,
you may want to consider storing the UPP in a static variable to avoid constant
allocation of memory.
I haven't looked at the code, though, so I don't know whether this method applies
to that case.
Comment 5•26 years ago
|
||
if its mac only should gordon get this bug?
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Comment 6•26 years ago
|
||
Simon and Gordon checked in a fix this morning
in mozilla/nsprpub/pr/src/md/mac/macio.c
at 03/04/99 11:27
Marking fixed.
this is a low level fix. can somebody verfiy this, or give me the
authority (and a clue how) to do so?
thanks
Reporter | ||
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 8•26 years ago
|
||
I can verify it's fixed. If you ZoneRanger, you could poke around in the heap
and see that it no longer leaks also. ZoneRanger is on the CodeWarrior CDs.
Comment 9•25 years ago
|
||
NSPR now has its own Bugzilla product. Moving this bug to the NSPR product.
You need to log in
before you can comment on or make changes to this bug.
Description
•