Closed Bug 819801 Opened 12 years ago Closed 11 years ago

Verify SQLite's memory reporting is accurate

Categories

(Toolkit :: Storage, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

(Whiteboard: [MemShrink:P3][qa-])

Attachments

(1 file, 2 obsolete files)

We use SQLite's built-in memory reporting, and assume that it is correct.  Since we provide the allocator that SQLite uses, it should be easy to check if this is actually true.
Whiteboard: [MemShrink] → [MemShrink:P3]
It's a small patch.  SQLite's numbers match ours, which is nice!
Attachment #832894 - Flags: review?(khuey)
A marginally tweaked version.
Attachment #8333628 - Flags: review?(khuey)
Attachment #832894 - Attachment is obsolete: true
Attachment #832894 - Flags: review?(khuey)
Comment on attachment 8333628 [details] [diff] [review]
In DMD builds, check that SQLite's reporting of its total memory consumption are correct.

A storage peer should review this, but I strongly suspect there are thread safety issues here.
Attachment #8333628 - Flags: review?(khuey) → review?(bugmail)
This version makes gSqliteMemoryUsed an Atomic<size_t>, which should fix the
thread-safety issues.
Attachment #8333670 - Flags: review?(bugmail)
Attachment #8333628 - Attachment is obsolete: true
Attachment #8333628 - Flags: review?(bugmail)
Comment on attachment 8333670 [details] [diff] [review]
In DMD builds, check that SQLite's reporting of its total memory consumption are correct.

Yeah, threading would have been a concern.  mozilla::Atomic seems to have that exceedingly well in hand.
Attachment #8333670 - Flags: review?(bugmail) → review+
https://hg.mozilla.org/mozilla-central/rev/5c75acfe2076
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [MemShrink:P3] → [MemShrink:P3][qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: