* this function should not otherwise delete or modify the resource. Neither
* should the underlying buffer be deallocated or modified except through the
* destructor of the external string resource.
- */
- V8EXPORT static Local<String> NewExternal(
+ */ V8EXPORT static Local<String> NewExternal(
ExternalAsciiStringResource* resource);
/**
* that is kept alive by JavaScript objects.
* \returns the adjusted value.
*/
- static int AdjustAmountOfExternalAllocatedMemory(int change_in_bytes);
+ static intptr_t AdjustAmountOfExternalAllocatedMemory(
+ intptr_t change_in_bytes);
/**
* Suspends recording of tick samples in the profiler.
}
-int V8::AdjustAmountOfExternalAllocatedMemory(int change_in_bytes) {
+intptr_t V8::AdjustAmountOfExternalAllocatedMemory(intptr_t change_in_bytes) {
i::Isolate* isolate = i::Isolate::Current();
if (IsDeadCheck(isolate, "v8::V8::AdjustAmountOfExternalAllocatedMemory()")) {
return 0;
}
-int Heap::AdjustAmountOfExternalAllocatedMemory(int change_in_bytes) {
+intptr_t Heap::AdjustAmountOfExternalAllocatedMemory(
+ intptr_t change_in_bytes) {
ASSERT(HasBeenSetUp());
- int amount = amount_of_external_allocated_memory_ + change_in_bytes;
+ intptr_t amount = amount_of_external_allocated_memory_ + change_in_bytes;
if (change_in_bytes >= 0) {
// Avoid overflow.
if (amount > amount_of_external_allocated_memory_) {
amount_of_external_allocated_memory_ = amount;
}
- int amount_since_last_global_gc =
+ intptr_t amount_since_last_global_gc =
amount_of_external_allocated_memory_ -
amount_of_external_allocated_memory_at_last_global_gc_;
if (amount_since_last_global_gc > external_allocation_limit_) {
// The amount of external memory registered through the API kept alive
// by global handles
- int amount_of_external_allocated_memory_;
+ intptr_t amount_of_external_allocated_memory_;
// Caches the amount of external memory registered at the last global gc.
int amount_of_external_allocated_memory_at_last_global_gc_;