V8 has its own heap, and allocates directly from the OS (see OS::Allocate). The garbage collector should never be touching pages managed by the libc malloc/free heap. V8 of course does make use of the malloc/free heap for non-JavaScript allocations within the C++ code, but those are normal manually managed allocations and don't interact with GC.
On Sun, Jul 19, 2009 at 11:00 PM, Piero B. Contezini<[email protected]> wrote: > > Thanks > > I've figured it out, was a vector problem with a multiple inhenrence class. > I've asked because valgrind didnt give me any clue, then I tought it > could be V8 garbage collector. > > > On Sun, Jul 19, 2009 at 3:00 PM, Dean McNamee<[email protected]> wrote: >> >> V8 shouldn't be touching the system malloc routines. You probably >> have a subtle bug (use after free / heap corruption), and using a >> profiler changes things subtly enough that it doesn't crash. I would >> run it under valgrind and hope you can figure out what's going on. >> >> On Sun, Jul 19, 2009 at 3:44 AM, Piero B. >> Contezini<[email protected]> wrote: >>> >>> Hello, >>> >>> I'm new to the V8 engine, doing some tests trying to integrate with my >>> application, and I'm seeing a behavior I think maybe related to the >>> Garbage collector and mine incorrect usage of it. >>> When running code in C++, coming from a V8 registered object through a >>> callback, the malloc is overwritten to the V8 Garbage collector? >>> I'm asking this because when running my code without any profiler, I >>> get a core dump. >>> But whenever I overwrite the malloc with a profiling library like >>> Gmalloc through gdb, it works ok and doesn't give me any error. >>> >>> Thanks >>> >>> Piero >>> >>> > >>> >> >> > >> > > > > --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list [email protected] http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---
