Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Unified Diff: src/heap/spaces.h

Issue 2489933002: [heap] Fix -Wsign-compare warnings (Closed)
Patch Set: fix test Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.h
diff --git a/src/heap/spaces.h b/src/heap/spaces.h
index 4c981f32c0517a3ab67264d48a54c317d3289995..df086c7ca89dc3179b2fb24e37c63b9e5ac0b43f 100644
--- a/src/heap/spaces.h
+++ b/src/heap/spaces.h
@@ -1643,7 +1643,7 @@ class FreeList {
public:
// This method returns how much memory can be allocated after freeing
// maximum_freed memory.
- static inline int GuaranteedAllocatable(int maximum_freed) {
+ static inline size_t GuaranteedAllocatable(size_t maximum_freed) {
if (maximum_freed <= kTiniestListMax) {
// Since we are not iterating over all list entries, we cannot guarantee
// that we can find the maximum freed block in that free list.
@@ -1685,8 +1685,8 @@ class FreeList {
}
// Return the number of bytes available on the free list.
- intptr_t Available() {
- intptr_t available = 0;
+ size_t Available() {
+ size_t available = 0;
ForAllFreeListCategories([&available](FreeListCategory* category) {
available += category->available();
});
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698