Closed Bug 73511 Opened 24 years ago Closed 24 years ago

PORT_Arena code never uses PLArena's freelist

Categories

(NSS :: Libraries, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nelson, Assigned: nelson)

References

(Depends on 1 open bug)

Details

One of the supposed advantages of using PLArenaPools is that arenas are recycled in a freelist, thereby making calls to malloc and free less necessary. But PORT_FreeArena calls PL_FinishArenaPool as the destructor for the arena list, and that function actually frees the arenas in the pool, rather than returning them to the free list. If NSS wants to actually use the arena free list, PORT_FreeArena should call PL_FreeArenaPool instead of PL_FinishArenaPool, but ONLY if PL_ARENAMETER is NOT defined. This change might potentially reduce heap lock pressure substantially but it depends on bug 45343 being fixed first.
Setting target to 3.3, but will set to 3.2.1 if there's agreement.
Status: NEW → ASSIGNED
Depends on: 45343
Priority: -- → P1
Target Milestone: --- → 3.3
This is fixed in NSS 3.2.1 and NSS 3.3 (and later). The fix depends on NSPR 4.1.1 and later. When NSS 3.2.1 is used with NSPR 4.1.1, it calls PL_FreeArenaPool prior to calling PL_FinishArenaPool, thereby ensuring that the pool's arena blocks go onto NSPR's arena free list. When NSS 3.2.1 is used with older versions of NSPR, it does not call PL_FinishArenaPool and causes the arena blocks to be freed instead. This is done because of a bug in the free list management in older versions of NSPR.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Target Milestone: 3.3 → 3.2.1
You need to log in before you can comment on or make changes to this bug.