embedded-v8

How can I change the following static linked program into dynamic linked program?

时光毁灭记忆、已成空白 提交于 2020-12-14 23:48:40
问题 I have already figure out how to staticly link v8 with my own GLIBC/STDC++. $(GCC_ROOT)/bin/g++ samples/bench.cpp -o bench -isystem$(GLIBC_ROOT)/include/ -I. -Iinclude -isystem$(GLIBC) -nodefaultlibs -DV8_COMPRESS_POINTERS -static $(V8_OBJ)/libv8_monolith.a -Wl,--start-group $(GCC_ROOT)/lib64/libstdc++.a $(GLIBC_ROOT)/lib/libpthread.a $(GLIBC_ROOT)/lib/libdl.a $(GLIBC_ROOT)/lib/libm.a $(GLIBC_ROOT)/lib/librt.a $(GCC_GCC)/libgcc.a $(GCC_GCC)/libgcc_eh.a $(GCC_GCC)/libcommon.a $(GLIBC_ROOT)/lib

How can I change the following static linked program into dynamic linked program?

故事扮演 提交于 2020-12-14 23:39:05
问题 I have already figure out how to staticly link v8 with my own GLIBC/STDC++. $(GCC_ROOT)/bin/g++ samples/bench.cpp -o bench -isystem$(GLIBC_ROOT)/include/ -I. -Iinclude -isystem$(GLIBC) -nodefaultlibs -DV8_COMPRESS_POINTERS -static $(V8_OBJ)/libv8_monolith.a -Wl,--start-group $(GCC_ROOT)/lib64/libstdc++.a $(GLIBC_ROOT)/lib/libpthread.a $(GLIBC_ROOT)/lib/libdl.a $(GLIBC_ROOT)/lib/libm.a $(GLIBC_ROOT)/lib/librt.a $(GCC_GCC)/libgcc.a $(GCC_GCC)/libgcc_eh.a $(GCC_GCC)/libcommon.a $(GLIBC_ROOT)/lib

Access violation executing location 0x0000000000000000 after calling Isolate::New()

半世苍凉 提交于 2020-12-13 03:53:50
问题 I can't seem to figure out something getting V8 started up. I have this code: if (!_V8Initialized) { v8::V8::InitializeICU(); v8::V8::InitializeExternalStartupData("x86\\"); // (this loads ok, I checked) auto platform = v8::platform::CreateDefaultPlatform(); v8::V8::InitializePlatform(platform); v8::V8::Initialize(); _V8Initialized = true; } auto params = Isolate::CreateParams(); params.array_buffer_allocator = ArrayBuffer::Allocator::NewDefaultAllocator(); _Isolate = Isolate::New(params);

Access violation executing location 0x0000000000000000 after calling Isolate::New()

自闭症网瘾萝莉.ら 提交于 2020-12-13 03:53:41
问题 I can't seem to figure out something getting V8 started up. I have this code: if (!_V8Initialized) { v8::V8::InitializeICU(); v8::V8::InitializeExternalStartupData("x86\\"); // (this loads ok, I checked) auto platform = v8::platform::CreateDefaultPlatform(); v8::V8::InitializePlatform(platform); v8::V8::Initialize(); _V8Initialized = true; } auto params = Isolate::CreateParams(); params.array_buffer_allocator = ArrayBuffer::Allocator::NewDefaultAllocator(); _Isolate = Isolate::New(params);

How to use the same context across multiple functions in v8 Javascript?

风格不统一 提交于 2020-04-10 21:20:45
问题 I am new to V8 and trying to create some bindings between my C++ and JS code. The issue is that I am not able to access a global Javascript variable across different Javascript functions. The reason is because each Javascript function is called my different C++ function. I guess the problem with my code is that I am creating a new local context within each C++ function. My JS Code : var test = []; function f1() { var obj = {}; obj.name = "Testing"; test.push(obj); } function f2() { var value

How to use the same context across multiple functions in v8 Javascript?

末鹿安然 提交于 2020-04-10 21:18:13
问题 I am new to V8 and trying to create some bindings between my C++ and JS code. The issue is that I am not able to access a global Javascript variable across different Javascript functions. The reason is because each Javascript function is called my different C++ function. I guess the problem with my code is that I am creating a new local context within each C++ function. My JS Code : var test = []; function f1() { var obj = {}; obj.name = "Testing"; test.push(obj); } function f2() { var value

V8 garbage collector callbacks for measuring GC activity

为君一笑 提交于 2020-03-24 03:08:50
问题 I have a small question related to V8 6.7.240 GC behavior and AddGCPrologueCallback / AddGCEpilogueCallback callbacks. A little story behind the problem: we launch custom JS code using V8 engine, and in order to limit execution by time we have a watchdog (separate thread with isolate->TerminateExecution() call) that monitors code and kills it in case of long running, but with respect to GC activity. So, if code execution timeout equals to 200ms , GC activity takes 300ms and code takes 199ms

V8 garbage collector callbacks for measuring GC activity

百般思念 提交于 2020-03-24 03:07:46
问题 I have a small question related to V8 6.7.240 GC behavior and AddGCPrologueCallback / AddGCEpilogueCallback callbacks. A little story behind the problem: we launch custom JS code using V8 engine, and in order to limit execution by time we have a watchdog (separate thread with isolate->TerminateExecution() call) that monitors code and kills it in case of long running, but with respect to GC activity. So, if code execution timeout equals to 200ms , GC activity takes 300ms and code takes 199ms

V8 isolates mapped memory leaks

倾然丶 夕夏残阳落幕 提交于 2020-01-05 03:36:34
问题 V8 developer is needed. I've noticed that the following code leaks mapped memory (mmap, munmap), concretely the amount of mapped regions within cat /proc/<pid>/maps continuously grows and hits the system limit pretty quickly ( /proc/sys/vm/max_map_count ). void f() { auto platform = v8::platform::CreateDefaultPlatform(); v8::Isolate::CreateParams create_params; create_params.array_buffer_allocator = v8::ArrayBuffer::Allocator::NewDefaultAllocator(); v8::V8::InitializePlatform(platform); v8:

Rubyracer (V8 binding for Ruby) performs really slow

☆樱花仙子☆ 提交于 2020-01-02 14:12:55
问题 So, I have a TCP server in eventmachine and therubyracer is used as a way to pre-pend operations (like filters or extensions) to the server. It all works charming when the server is not receiving a lot of data, but when it's being flooded (it is required sometimes) it becomes really slow. So, I did a small benchmark to see how slower the rubyracer is compared to Ruby, and I was shocked when I saw the results: user system total real V8: 0.060000 0.000000 0.060000 ( 0.059903) Ruby: 0.000000 0