Closed Bug 3410 Opened 26 years ago Closed 26 years ago

Memory leak on PR_Read

Categories

(NSPR :: NSPR, defect, P1)

PowerPC
Mac System 8.5
defect

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).
This is a Mac only bug, BTW.
Severity: major → critical
Note: the tree is kept close waiting for this bug and a couple of other ones to be fixed.
Assignee: wtc → srinivas
New NSPR bugs should be assigned to the module owner Srinivas.
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.
if its mac only should gordon get this bug?
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
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
Status: RESOLVED → VERIFIED
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.
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.