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

Unified Diff: src/zone/zone-segment.cc

Issue 2335343007: Pool implementation for zone segments (Closed)
Patch Set: Remove garbage stack Created 4 years, 3 months 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
« src/zone/accounting-allocator.h ('K') | « src/zone/zone-segment.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/zone/zone-segment.cc
diff --git a/src/base/file-utils.h b/src/zone/zone-segment.cc
similarity index 52%
copy from src/base/file-utils.h
copy to src/zone/zone-segment.cc
index ce9e9a1c41cb2876f363d5093585cbe3947f402d..1fa49d49ba8b328b86fc5d9e147edcc5060e7e4b 100644
--- a/src/base/file-utils.h
+++ b/src/zone/zone-segment.cc
@@ -2,17 +2,22 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef V8_FILE_UTILS_H_
-#define V8_FILE_UTILS_H_
+#include "src/zone/zone-segment.h"
namespace v8 {
namespace internal {
-// Helper functions to manipulate file paths.
+void Segment::ZapContents() {
+#ifdef DEBUG
+ memset(start(), kZapDeadByte, capacity());
+#endif
+}
-char* RelativePath(char** buffer, const char* exec_path, const char* name);
+void Segment::ZapHeader() {
+#ifdef DEBUG
+ memset(this, kZapDeadByte, sizeof(Segment));
+#endif
+}
} // namespace internal
} // namespace v8
-
-#endif // V8_FILE_UTILS_H_
« src/zone/accounting-allocator.h ('K') | « src/zone/zone-segment.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698