OLD | NEW |
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 3435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3446 enum class ArrayBufferCreationMode { kInternalized, kExternalized }; | 3446 enum class ArrayBufferCreationMode { kInternalized, kExternalized }; |
3447 | 3447 |
3448 | 3448 |
3449 /** | 3449 /** |
3450 * An instance of the built-in ArrayBuffer constructor (ES6 draft 15.13.5). | 3450 * An instance of the built-in ArrayBuffer constructor (ES6 draft 15.13.5). |
3451 * This API is experimental and may change significantly. | 3451 * This API is experimental and may change significantly. |
3452 */ | 3452 */ |
3453 class V8_EXPORT ArrayBuffer : public Object { | 3453 class V8_EXPORT ArrayBuffer : public Object { |
3454 public: | 3454 public: |
3455 /** | 3455 /** |
3456 * Allocator that V8 uses to allocate |ArrayBuffer|'s memory. | 3456 * A thread-safe allocator that V8 uses to allocate |ArrayBuffer|'s memory. |
3457 * The allocator is a global V8 setting. It has to be set via | 3457 * The allocator is a global V8 setting. It has to be set via |
3458 * Isolate::CreateParams. | 3458 * Isolate::CreateParams. |
3459 * | 3459 * |
| 3460 * Memory allocated through this allocator by V8 is accounted for as external |
| 3461 * memory by V8. Note that V8 keeps track of the memory for all internalized |
| 3462 * |ArrayBuffer|s. Responsibility for tracking external memory (using |
| 3463 * Isolate::AdjustAmountOfExternalAllocatedMemory) is handed over to the |
| 3464 * embedder upon externalization and taken over upon internalization (creating |
| 3465 * an internalized buffer from an existing buffer). |
| 3466 * |
| 3467 * Note that it is unsafe to call back into V8 from any of the allocator |
| 3468 * functions. |
| 3469 * |
3460 * This API is experimental and may change significantly. | 3470 * This API is experimental and may change significantly. |
3461 */ | 3471 */ |
3462 class V8_EXPORT Allocator { // NOLINT | 3472 class V8_EXPORT Allocator { // NOLINT |
3463 public: | 3473 public: |
3464 virtual ~Allocator() {} | 3474 virtual ~Allocator() {} |
3465 | 3475 |
3466 /** | 3476 /** |
3467 * Allocate |length| bytes. Return NULL if allocation is not successful. | 3477 * Allocate |length| bytes. Return NULL if allocation is not successful. |
3468 * Memory should be initialized to zeroes. | 3478 * Memory should be initialized to zeroes. |
3469 */ | 3479 */ |
(...skipping 5262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8732 */ | 8742 */ |
8733 | 8743 |
8734 | 8744 |
8735 } // namespace v8 | 8745 } // namespace v8 |
8736 | 8746 |
8737 | 8747 |
8738 #undef TYPE_CHECK | 8748 #undef TYPE_CHECK |
8739 | 8749 |
8740 | 8750 |
8741 #endif // INCLUDE_V8_H_ | 8751 #endif // INCLUDE_V8_H_ |
OLD | NEW |