v8  4.5.103 (node 4.8.7)
V8 is Google's open source JavaScript engine
ArrayBuffer::Allocator Class Referenceabstract

#include <v8.h>

Public Member Functions

virtual ~Allocator ()
 
virtual void * Allocate (size_t length)=0
 
virtual void * AllocateUninitialized (size_t length)=0
 
virtual void Free (void *data, size_t length)=0
 

Detailed Description

Allocator that V8 uses to allocate |ArrayBuffer|'s memory. The allocator is a global V8 setting. It has to be set via Isolate::CreateParams.

This API is experimental and may change significantly.

Definition at line 3366 of file v8.h.

Constructor & Destructor Documentation

◆ ~Allocator()

virtual ~Allocator ( )
inlinevirtual

Definition at line 3368 of file v8.h.

Member Function Documentation

◆ Allocate()

virtual void* Allocate ( size_t  length)
pure virtual

Allocate |length| bytes. Return NULL if allocation is not successful. Memory should be initialized to zeroes.

◆ AllocateUninitialized()

virtual void* AllocateUninitialized ( size_t  length)
pure virtual

Allocate |length| bytes. Return NULL if allocation is not successful. Memory does not have to be initialized.

◆ Free()

virtual void Free ( void *  data,
size_t  length 
)
pure virtual

Free the memory block of size |length|, pointed to by |data|. That memory is guaranteed to be previously allocated by |Allocate|.


The documentation for this class was generated from the following file: