aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/javascript.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2023-08-24 19:39:00 -0700
committerGravatar GitHub <noreply@github.com> 2023-08-24 19:39:00 -0700
commit8a48e8bb0b7de985a96b3a4cae389e3294a2c0e3 (patch)
tree20d8dc382512313061c20296d1e33e8d18fbbde3 /src/bun.js/javascript.zig
parent097ae4e982a9cbcae6b4886c4efb82d452629b99 (diff)
downloadbun-8a48e8bb0b7de985a96b3a4cae389e3294a2c0e3.tar.gz
bun-8a48e8bb0b7de985a96b3a4cae389e3294a2c0e3.tar.zst
bun-8a48e8bb0b7de985a96b3a4cae389e3294a2c0e3.zip
Report extra memory more (#4289)
* Report memory allocated in fetch * Memory size reporting to `Headers` * Fixup memory reporting allocator * Make these tests do more * cleanup some of this --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/bun.js/javascript.zig')
-rw-r--r--src/bun.js/javascript.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bun.js/javascript.zig b/src/bun.js/javascript.zig
index 03cdab205..e5d7626d5 100644
--- a/src/bun.js/javascript.zig
+++ b/src/bun.js/javascript.zig
@@ -387,6 +387,7 @@ pub const VirtualMachine = struct {
standalone_module_graph: ?*bun.StandaloneModuleGraph = null,
hot_reload: bun.CLI.Command.HotReload = .none,
+ jsc: *JSC.VM = undefined,
/// hide bun:wrap from stack traces
/// bun:wrap is very noisy
@@ -1020,6 +1021,7 @@ pub const VirtualMachine = struct {
);
vm.regular_event_loop.global = vm.global;
vm.regular_event_loop.virtual_machine = vm;
+ vm.jsc = vm.global.vm();
if (source_code_printer == null) {
var writer = try js_printer.BufferWriter.init(allocator);
@@ -1122,6 +1124,7 @@ pub const VirtualMachine = struct {
);
vm.regular_event_loop.global = vm.global;
vm.regular_event_loop.virtual_machine = vm;
+ vm.jsc = vm.global.vm();
if (source_code_printer == null) {
var writer = try js_printer.BufferWriter.init(allocator);
@@ -1237,6 +1240,7 @@ pub const VirtualMachine = struct {
);
vm.regular_event_loop.global = vm.global;
vm.regular_event_loop.virtual_machine = vm;
+ vm.jsc = vm.global.vm();
if (source_code_printer == null) {
var writer = try js_printer.BufferWriter.init(allocator);