v8  4.5.103 (node 4.8.7)
V8 is Google's open source JavaScript engine
ResourceConstraints Class Reference

#include <v8.h>

Public Member Functions

 ResourceConstraints ()
 
void ConfigureDefaults (uint64_t physical_memory, uint64_t virtual_memory_limit)
 
 V8_DEPRECATED ("Use two-args version instead", void ConfigureDefaults(uint64_t physical_memory, uint64_t virtual_memory_limit, uint32_t number_of_processors))
 
int max_semi_space_size () const
 
void set_max_semi_space_size (int value)
 
int max_old_space_size () const
 
void set_max_old_space_size (int value)
 
int max_executable_size () const
 
void set_max_executable_size (int value)
 
uint32_t * stack_limit () const
 
void set_stack_limit (uint32_t *value)
 
 V8_DEPRECATED ("Unused, will be removed", int max_available_threads() const)
 
 V8_DEPRECATED ("Unused, will be removed", void set_max_available_threads(int value))
 
size_t code_range_size () const
 
void set_code_range_size (size_t value)
 

Detailed Description

A set of constraints that specifies the limits of the runtime's memory use. You must set the heap size before initializing the VM - the size cannot be adjusted after the VM is initialized.

If you are using threads then you should hold the V8::Locker lock while setting the stack limit and you must set a non-default stack limit separately for each thread.

Definition at line 4791 of file v8.h.

Constructor & Destructor Documentation

◆ ResourceConstraints()

Member Function Documentation

◆ code_range_size()

size_t code_range_size ( ) const
inline

Definition at line 4830 of file v8.h.

◆ ConfigureDefaults()

void ConfigureDefaults ( uint64_t  physical_memory,
uint64_t  virtual_memory_limit 
)

Configures the constraints with reasonable default values based on the capabilities of the current device the VM is running on.

Parameters
physical_memoryThe total amount of physical memory on the current device, in bytes.
virtual_memory_limitThe amount of virtual memory on the current device, in bytes, or zero, if there is no limit.

◆ max_executable_size()

int max_executable_size ( ) const
inline

Definition at line 4817 of file v8.h.

◆ max_old_space_size()

int max_old_space_size ( ) const
inline

Definition at line 4815 of file v8.h.

◆ max_semi_space_size()

int max_semi_space_size ( ) const
inline

Definition at line 4813 of file v8.h.

◆ set_code_range_size()

void set_code_range_size ( size_t  value)
inline

Definition at line 4831 of file v8.h.

◆ set_max_executable_size()

void set_max_executable_size ( int  value)
inline

Definition at line 4818 of file v8.h.

◆ set_max_old_space_size()

void set_max_old_space_size ( int  value)
inline

Definition at line 4816 of file v8.h.

◆ set_max_semi_space_size()

void set_max_semi_space_size ( int  value)
inline

Definition at line 4814 of file v8.h.

◆ set_stack_limit()

void set_stack_limit ( uint32_t *  value)
inline

Definition at line 4821 of file v8.h.

◆ stack_limit()

uint32_t* stack_limit ( ) const
inline

Definition at line 4819 of file v8.h.

◆ V8_DEPRECATED() [1/3]

V8_DEPRECATED ( Unused,
will be removed"  ,
int max_available_threads() const   
)
inline

Definition at line 4822 of file v8.h.

◆ V8_DEPRECATED() [2/3]

V8_DEPRECATED ( Unused,
will be removed"  ,
void   set_max_available_threadsint value 
)
inline

Definition at line 4826 of file v8.h.

◆ V8_DEPRECATED() [3/3]

V8_DEPRECATED ( "Use two-args version instead"  ,
void   ConfigureDefaultsuint64_t physical_memory, uint64_t virtual_memory_limit, uint32_t number_of_processors 
)

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