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

Side by Side Diff: src/spaces.cc

Issue 21095008: Revert the latest set of platform changes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/spaces.h ('k') | src/v8threads.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after
2036 } 2036 }
2037 2037
2038 2038
2039 intptr_t FreeListCategory::Concatenate(FreeListCategory* category) { 2039 intptr_t FreeListCategory::Concatenate(FreeListCategory* category) {
2040 intptr_t free_bytes = 0; 2040 intptr_t free_bytes = 0;
2041 if (category->top_ != NULL) { 2041 if (category->top_ != NULL) {
2042 ASSERT(category->end_ != NULL); 2042 ASSERT(category->end_ != NULL);
2043 // This is safe (not going to deadlock) since Concatenate operations 2043 // This is safe (not going to deadlock) since Concatenate operations
2044 // are never performed on the same free lists at the same time in 2044 // are never performed on the same free lists at the same time in
2045 // reverse order. 2045 // reverse order.
2046 ScopedLock lock_target(mutex()); 2046 ScopedLock lock_target(mutex_);
2047 ScopedLock lock_source(category->mutex()); 2047 ScopedLock lock_source(category->mutex());
2048 free_bytes = category->available(); 2048 free_bytes = category->available();
2049 if (end_ == NULL) { 2049 if (end_ == NULL) {
2050 end_ = category->end(); 2050 end_ = category->end();
2051 } else { 2051 } else {
2052 category->end()->set_next(top_); 2052 category->end()->set_next(top_);
2053 } 2053 }
2054 top_ = category->top(); 2054 top_ = category->top();
2055 available_ += category->available(); 2055 available_ += category->available();
2056 category->Reset(); 2056 category->Reset();
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after
3209 object->ShortPrint(); 3209 object->ShortPrint();
3210 PrintF("\n"); 3210 PrintF("\n");
3211 } 3211 }
3212 printf(" --------------------------------------\n"); 3212 printf(" --------------------------------------\n");
3213 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3213 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3214 } 3214 }
3215 3215
3216 #endif // DEBUG 3216 #endif // DEBUG
3217 3217
3218 } } // namespace v8::internal 3218 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/spaces.h ('k') | src/v8threads.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698