#include <v8-platform.h>
Public Member Functions | |
| virtual | ~Allocator ()=default |
| virtual void * | Allocate (size_t size)=0 |
| virtual void * | AllocateUninitialized (size_t size)=0 |
| virtual void * | AllocateUninitializedOrCrash (size_t size)=0 |
| virtual void | Free (void *ptr)=0 |
An allocator interface for managing memory explicitly.
Implementations of this interface must be thread-safe as V8 will invoke these methods concurrently from multiple threads.
|
virtualdefault |
|
pure virtual |
Allocates zero-initialized memory.
| size | The number of bytes to allocate. |
|
pure virtual |
Allocates uninitialized memory.
| size | The number of bytes to allocate. |
|
pure virtual |
Allocates uninitialized memory.
| size | The number of bytes to allocate. |
|
pure virtual |
Frees memory that was acquired with one of the allocation methods.
| ptr | Pointer to the memory to free. If ptr is nullptr, no operation is performed. |