Closed
Bug 1147680
Opened 9 years ago
Closed 9 years ago
Consider using PR_MemMap when deserializing heap snapshots
Categories
(DevTools :: Memory, defect)
Tracking
(firefox41 fixed)
RESOLVED
FIXED
Firefox 41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: fitzgen, Assigned: fitzgen)
References
Details
Attachments
(1 file)
6.97 KB,
patch
|
jimb
:
review+
|
Details | Diff | Splinter Review |
> ::: toolkit/devtools/server/ChromeUtils.cpp
> @@ +425,5 @@
> > +
> > + uint32_t bytesRead = 0;
> > + while (bytesRead < size) {
> > + uint32_t bytesLeft = size - bytesRead;
> > + int32_t bytesReadThisTime = PR_Read(fd, buffer.get() + bytesRead, bytesLeft);
>
> For the future: there is a PR_MemMap.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → nfitzgerald
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8614945 -
Flags: review?(jimb)
Comment 2•9 years ago
|
||
Comment on attachment 8614945 [details] [diff] [review] Use PR_MemMap when deserializing heap snapshots Review of attachment 8614945 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/devtools/server/AutoMemMap.h @@ +32,5 @@ > +{ > + MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER; > + > + PRFileInfo64 fileInfo; > + PRFileDesc* fd; Just curious, does NSPR actually require you to keep fd open while the memory is mapped? On POSIX, at least, you can map the file, and then close the fd, and the mapping holds its own reference to the file that is automatically dropped when the memory is freed. If NSPR works this way, then we could open the fd in init, do the mapping, and then close it. No need to keep it around.
Attachment #8614945 -
Flags: review?(jimb) → review+
Assignee | ||
Comment 3•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=5f2fdcefa7db
https://hg.mozilla.org/mozilla-central/rev/ddadcaa630f0
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 41
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•