Lines Matching defs:length

133   void* Allocate(size_t length) override {
134 return allocator_->Allocate(length);
137 void* AllocateUninitialized(size_t length) override {
138 return allocator_->AllocateUninitialized(length);
141 void Free(void* data, size_t length) override {
142 allocator_->Free(data, length);
153 void* Allocate(size_t length) override {
154 if (length >= kVMThreshold) return AllocateVM(length);
155 return ArrayBufferAllocatorBase::Allocate(length);
158 void* AllocateUninitialized(size_t length) override {
159 if (length >= kVMThreshold) return AllocateVM(length);
160 return ArrayBufferAllocatorBase::AllocateUninitialized(length);
163 void Free(void* data, size_t length) override {
164 if (length >= kVMThreshold) {
165 FreeVM(data, length);
167 ArrayBufferAllocatorBase::Free(data, length);
174 void* AllocateVM(size_t length) {
175 DCHECK_LE(kVMThreshold, length);
178 size_t allocated = RoundUp(length, page_size);
183 void FreeVM(void* data, size_t length) {
186 size_t allocated = RoundUp(length, page_size);
194 void* Allocate(size_t length) override {
195 return ArrayBufferAllocatorBase::Allocate(Adjust(length));
198 void* AllocateUninitialized(size_t length) override {
199 return ArrayBufferAllocatorBase::AllocateUninitialized(Adjust(length));
202 void Free(void* data, size_t length) override {
203 return ArrayBufferAllocatorBase::Free(data, Adjust(length));
207 size_t Adjust(size_t length) {
209 return length > kAllocationLimit ? i::AllocatePageSize() : length;
221 void* Allocate(size_t length) override {
222 if (length > space_left_) {
225 space_left_ -= length;
226 return MockArrayBufferAllocator::Allocate(length);
229 void* AllocateUninitialized(size_t length) override {
230 if (length > space_left_) {
233 space_left_ -= length;
234 return MockArrayBufferAllocator::AllocateUninitialized(length);
237 void Free(void* data, size_t length) override {
238 space_left_ += length;
239 return MockArrayBufferAllocator::Free(data, length);
252 // allocation length.
258 void* Allocate(size_t length) override {
259 if (length < kChunkSize) {
260 return ArrayBufferAllocatorBase::Allocate(length);
263 return AllocateUninitialized(length);
266 void* AllocateUninitialized(size_t length) override {
267 if (length < kChunkSize) {
268 return ArrayBufferAllocatorBase::AllocateUninitialized(length);
270 size_t rounded_length = RoundUp(length, kChunkSize);
319 void Free(void* data, size_t length) override {
320 if (length < kChunkSize) {
321 return ArrayBufferAllocatorBase::Free(data, length);
326 size_t rounded_length = RoundUp(length, kChunkSize);
417 for (int i = 0, length = v8_array->Length(); i < length; ++i) {
453 size_t length() const override { return file_->size(); }
496 int length = entry->second->length;
497 uint8_t* cache = new uint8_t[length];
498 memcpy(cache, entry->second->data, length);
500 cache, length, ScriptCompiler::CachedData::BufferOwned);
513 int length = cache_data->length;
514 uint8_t* cache = new uint8_t[length];
515 memcpy(cache, cache_data->data, length);
517 new ScriptCompiler::CachedData(cache, length,
833 fwrite(*str, sizeof(**str), str.length(), stdout);
838 fwrite(*str, sizeof(**str), str.length(), stdout);
1096 for (int i = 0, length = module_requests->Length(); i < length; ++i) {
1440 int length = 0;
1442 reinterpret_cast<uint8_t*>(ReadChars(absolute_path.c_str(), &length)));
1443 if (length == 0) {
1449 static_cast<size_t>(length));
1470 int length = 0;
1471 std::unique_ptr<char[]> data(ReadChars(absolute_path.c_str(), &length));
1472 if (length == 0) {
1972 int length = exports_array->Length();
1973 Local<PrimitiveArray> exports = PrimitiveArray::New(isolate, length);
1974 for (int i = 0; i < length; ++i) {
2283 int n = static_cast<int>(fwrite(*str, sizeof(**str), str.length(), file));
2284 if (n != str.length()) {
2332 int length;
2340 length = static_cast<int>(strlen(buffer));
2341 if (length == 0) {
2343 } else if (buffer[length - 1] != '\n') {
2346 String::NewFromUtf8(isolate, buffer, NewStringType::kNormal, length)
2348 } else if (length > 1 && buffer[length - 2] == '\\') {
2349 buffer[length - 2] = '\n';
2353 NewStringType::kNormal, length - 1)
2359 length - 1)
3637 int length;
3638 std::unique_ptr<char[]> data(ReadChars(name, &length));
3655 static_cast<int>(lines[i].length()));
3670 int length;
3676 uint8_t* data = reinterpret_cast<uint8_t*>(ReadChars(*filename, &length));
3681 Local<v8::ArrayBuffer> buffer = ArrayBuffer::New(isolate, length);
3682 memcpy(buffer->GetBackingStore()->Data(), data, length);
3768 int length = static_cast<int>(string.length());
3769 DCHECK_LT(length, v8::String::kMaxLength);
3775 v8::NewStringType::kNormal, length)
3779 v8::NewStringType::kNormal, length))
3878 int length = message->Length();
3879 std::unique_ptr<uint16_t[]> buffer(new uint16_t[length]);
3880 message->Write(isolate, buffer.get(), 0, length);
3881 v8_inspector::StringView message_view(buffer.get(), length);
5035 uint32_t length = transfer_array->Length();
5036 for (uint32_t i = 0; i < length; ++i) {