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

Side by Side Diff: include/v8.h

Issue 1215513004: Revert of Let GC select the collector when the external memory allocation limit is reached (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/api.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** \mainpage V8 API Reference Guide 5 /** \mainpage V8 API Reference Guide
6 * 6 *
7 * V8 is Google's open source JavaScript engine. 7 * V8 is Google's open source JavaScript engine.
8 * 8 *
9 * This set of documents provides reference material generated from the 9 * This set of documents provides reference material generated from the
10 * V8 header file, include/v8.h. 10 * V8 header file, include/v8.h.
(...skipping 5905 matching lines...) Expand 10 before | Expand all | Expand 10 after
5916 Isolate(); 5916 Isolate();
5917 Isolate(const Isolate&); 5917 Isolate(const Isolate&);
5918 ~Isolate(); 5918 ~Isolate();
5919 Isolate& operator=(const Isolate&); 5919 Isolate& operator=(const Isolate&);
5920 void* operator new(size_t size); 5920 void* operator new(size_t size);
5921 void operator delete(void*, size_t); 5921 void operator delete(void*, size_t);
5922 5922
5923 void SetObjectGroupId(internal::Object** object, UniqueId id); 5923 void SetObjectGroupId(internal::Object** object, UniqueId id);
5924 void SetReferenceFromGroup(UniqueId id, internal::Object** object); 5924 void SetReferenceFromGroup(UniqueId id, internal::Object** object);
5925 void SetReference(internal::Object** parent, internal::Object** child); 5925 void SetReference(internal::Object** parent, internal::Object** child);
5926 void CollectGarbage(const char* gc_reason); 5926 void CollectAllGarbage(const char* gc_reason);
5927 }; 5927 };
5928 5928
5929 class V8_EXPORT StartupData { 5929 class V8_EXPORT StartupData {
5930 public: 5930 public:
5931 const char* data; 5931 const char* data;
5932 int raw_size; 5932 int raw_size;
5933 }; 5933 };
5934 5934
5935 5935
5936 /** 5936 /**
(...skipping 2219 matching lines...) Expand 10 before | Expand all | Expand 10 after
8156 reinterpret_cast<int64_t*>(reinterpret_cast<uint8_t*>(this) + 8156 reinterpret_cast<int64_t*>(reinterpret_cast<uint8_t*>(this) +
8157 I::kAmountOfExternalAllocatedMemoryOffset); 8157 I::kAmountOfExternalAllocatedMemoryOffset);
8158 int64_t* amount_of_external_allocated_memory_at_last_global_gc = 8158 int64_t* amount_of_external_allocated_memory_at_last_global_gc =
8159 reinterpret_cast<int64_t*>( 8159 reinterpret_cast<int64_t*>(
8160 reinterpret_cast<uint8_t*>(this) + 8160 reinterpret_cast<uint8_t*>(this) +
8161 I::kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset); 8161 I::kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset);
8162 int64_t amount = *amount_of_external_allocated_memory + change_in_bytes; 8162 int64_t amount = *amount_of_external_allocated_memory + change_in_bytes;
8163 if (change_in_bytes > 0 && 8163 if (change_in_bytes > 0 &&
8164 amount - *amount_of_external_allocated_memory_at_last_global_gc > 8164 amount - *amount_of_external_allocated_memory_at_last_global_gc >
8165 I::kExternalAllocationLimit) { 8165 I::kExternalAllocationLimit) {
8166 CollectGarbage("external memory allocation limit reached."); 8166 CollectAllGarbage("external memory allocation limit reached.");
8167 } 8167 }
8168 *amount_of_external_allocated_memory = amount; 8168 *amount_of_external_allocated_memory = amount;
8169 return *amount_of_external_allocated_memory; 8169 return *amount_of_external_allocated_memory;
8170 } 8170 }
8171 8171
8172 8172
8173 template<typename T> 8173 template<typename T>
8174 void Isolate::SetObjectGroupId(const Persistent<T>& object, 8174 void Isolate::SetObjectGroupId(const Persistent<T>& object,
8175 UniqueId id) { 8175 UniqueId id) {
8176 TYPE_CHECK(Value, T); 8176 TYPE_CHECK(Value, T);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
8347 */ 8347 */
8348 8348
8349 8349
8350 } // namespace v8 8350 } // namespace v8
8351 8351
8352 8352
8353 #undef TYPE_CHECK 8353 #undef TYPE_CHECK
8354 8354
8355 8355
8356 #endif // V8_H_ 8356 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698