Skip to main content

JSMemoryUsage

Struct JSMemoryUsage 

Source
#[repr(C)]
pub struct JSMemoryUsage {
Show 26 fields pub malloc_size: i64, pub malloc_count: i64, pub memory_used_size: i64, pub malloc_limit: i64, pub memory_used_count: i64, pub atom_count: i64, pub atom_size: i64, pub str_count: i64, pub str_size: i64, pub obj_count: i64, pub obj_size: i64, pub prop_count: i64, pub prop_size: i64, pub shape_count: i64, pub shape_size: i64, pub js_func_count: i64, pub js_func_size: i64, pub js_func_code_size: i64, pub js_func_pc2line_count: i64, pub js_func_pc2line_size: i64, pub c_func_count: i64, pub array_count: i64, pub fast_array_count: i64, pub fast_array_elements: i64, pub binary_object_count: i64, pub binary_object_size: i64,
}
Expand description

JSMemoryUsage: the shape JS_ComputeMemoryUsage fills in.

Field-for-field with the header so that a C program reading s->malloc_count reads the number we wrote there. Every field is int64_t in the reference; the size_t-valued ones are widened on the way out.

Fields§

§malloc_size: i64

Bytes the allocator holds.

§malloc_count: i64

Allocations outstanding.

§memory_used_size: i64

Bytes the allocator can still hand out (0 when unlimited).

§malloc_limit: i64

Times the allocator was asked for memory.

§memory_used_count: i64

Bytes the allocator has borrowed from the system.

§atom_count: i64

Atoms interned.

§atom_size: i64

Bytes those atoms occupy.

§str_count: i64

Strings.

§str_size: i64

Bytes those strings occupy.

§obj_count: i64

Objects.

§obj_size: i64

Bytes those objects occupy.

§prop_count: i64

Properties.

§prop_size: i64

Bytes those properties occupy.

§shape_count: i64

Shapes (hidden classes).

§shape_size: i64

Bytes those shapes occupy.

§js_func_count: i64

JavaScript functions.

§js_func_size: i64

Bytes of bytecode.

§js_func_code_size: i64

Bytecode instructions.

§js_func_pc2line_count: i64

Bytecode instructions, as a running total.

§js_func_pc2line_size: i64

Bytes of the pc-to-line table.

§c_func_count: i64

C functions.

§array_count: i64

Arrays.

§fast_array_count: i64

Arrays stored as element vectors.

§fast_array_elements: i64

Elements in those.

§binary_object_count: i64

Binary objects.

§binary_object_size: i64

Bytes they occupy.

Trait Implementations§

Source§

impl Clone for JSMemoryUsage

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for JSMemoryUsage

Source§

impl Default for JSMemoryUsage

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.