miscellaneous trace-malloc patches

RESOLVED FIXED in mozilla1.9alpha8

Status

()

Core
General
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: dbaron, Assigned: dbaron)

Tracking

Trunk
mozilla1.9alpha8
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Assignee)

Description

11 years ago
Here are three trace-malloc patches I've had in my mq that aren't worth their own separate bugs.
(Assignee)

Comment 1

11 years ago
Created attachment 276208 [details] [diff] [review]
lock in NS_TraceMallocDumpAllocations

We should acquire the lock (which requires bumping suppress_tracing) in NS_TraceMallocDumpAllocations so that we don't race with allocations on other threads.
Attachment #276208 - Flags: review?(brendan)
(Assignee)

Comment 2

11 years ago
Created attachment 276209 [details] [diff] [review]
make (void) signatures match

This makes (void) function signatures match the header file.  Without this I sometimes forget I'm in C rather than C++.
Attachment #276209 - Flags: review?(brendan)
(Assignee)

Comment 3

11 years ago
Created attachment 276210 [details] [diff] [review]
replace some strncpy with memcpy

This replaces some calls to strncpy with memcpy since we know there aren't any null-terminators in the middle, and uses the memcpy to copy the null-terminator rather than copying it separately.
Attachment #276210 - Flags: review?(brendan)

Updated

11 years ago
Attachment #276208 - Flags: review?(brendan)
Attachment #276208 - Flags: review+
Comment on attachment 276209 [details] [diff] [review]
make (void) signatures match

Yay, C. Or not.

/be
Attachment #276209 - Flags: review?(brendan)
Attachment #276209 - Flags: review+

Updated

11 years ago
Attachment #276210 - Flags: review?(brendan)
Attachment #276210 - Flags: review+
(Assignee)

Comment 5

11 years ago
Fixes checked in to trunk, 2007-08-10 17:52 -0700, 17:52, and 17:53.
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.