Struct rusty_v8::Allocator[][src]

#[repr(C)]
pub struct Allocator(_);
Expand description

A thread-safe allocator that V8 uses to allocate |ArrayBuffer|’s memory. The allocator is a global V8 setting. It has to be set via Isolate::CreateParams.

Memory allocated through this allocator by V8 is accounted for as external memory by V8. Note that V8 keeps track of the memory for all internalized |ArrayBuffer|s. Responsibility for tracking external memory (using Isolate::AdjustAmountOfExternalAllocatedMemory) is handed over to the embedder upon externalization and taken over upon internalization (creating an internalized buffer from an existing buffer).

Note that it is unsafe to call back into V8 from any of the allocator functions.

This is called v8::ArrayBuffer::Allocator in C++. Rather than use the namespace array_buffer, which will contain only the Allocator we opt in Rust to allow it to live in the top level: v8::Allocator

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.