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

Unified Diff: test/cctest/test-list.cc

Issue 7374002: Refactor allocation policies. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 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
« no previous file with comments | « src/zone-inl.h ('k') | test/cctest/test-regexp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-list.cc
diff --git a/test/cctest/test-list.cc b/test/cctest/test-list.cc
index e20ee8a3607b3b28a9cbd8ef41f0726a0e706772..a13a9f036919622597680c26476f2962cf8430bb 100644
--- a/test/cctest/test-list.cc
+++ b/test/cctest/test-list.cc
@@ -35,7 +35,7 @@ using namespace v8::internal;
// Use a testing allocator that clears memory before deletion.
class ZeroingAllocationPolicy {
public:
- static void* New(size_t size) {
+ void* New(size_t size) {
// Stash the size in the first word to use for Delete.
size_t true_size = size + sizeof(size_t);
size_t* result = reinterpret_cast<size_t*>(malloc(true_size));
@@ -44,7 +44,7 @@ class ZeroingAllocationPolicy {
return result + 1;
}
- static void Delete(void* ptr) {
+ void Delete(void* ptr) {
size_t* true_ptr = reinterpret_cast<size_t*>(ptr) - 1;
memset(true_ptr, 0, *true_ptr);
free(true_ptr);
« no previous file with comments | « src/zone-inl.h ('k') | test/cctest/test-regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698