good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
a3267ed9
Unverified
Commit
a3267ed9
authored
6 years ago
by
Péter Szilágyi
Browse files
Options
Downloads
Patches
Plain Diff
trie: don't report the root flushlist as an alloc
parent
9f7592c8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
trie/database.go
+2
-2
2 additions, 2 deletions
trie/database.go
with
2 additions
and
2 deletions
trie/database.go
+
2
−
2
View file @
a3267ed9
...
...
@@ -297,7 +297,7 @@ func (db *Database) Cap(limit common.StorageSize) error {
// db.nodesSize only contains the useful data in the cache, but when reporting
// the total memory consumption, the maintenance metadata is also needed to be
// counted. For every useful node, we track 2 extra hashes as the flushlist.
size
:=
db
.
nodesSize
+
common
.
StorageSize
(
len
(
db
.
nodes
)
*
2
*
common
.
HashLength
)
size
:=
db
.
nodesSize
+
common
.
StorageSize
(
(
len
(
db
.
nodes
)
-
1
)
*
2
*
common
.
HashLength
)
// If the preimage cache got large enough, push to disk. If it's still small
// leave for later to deduplicate writes.
...
...
@@ -512,6 +512,6 @@ func (db *Database) Size() (common.StorageSize, common.StorageSize) {
// db.nodesSize only contains the useful data in the cache, but when reporting
// the total memory consumption, the maintenance metadata is also needed to be
// counted. For every useful node, we track 2 extra hashes as the flushlist.
var
flushlistSize
=
common
.
StorageSize
(
len
(
db
.
nodes
)
*
2
*
common
.
HashLength
)
var
flushlistSize
=
common
.
StorageSize
(
(
len
(
db
.
nodes
)
-
1
)
*
2
*
common
.
HashLength
)
return
db
.
nodesSize
+
flushlistSize
,
db
.
preimagesSize
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment