Speaking of Really Bad Ideas: V8 flags aren't designed to be toggled
arbitrarily at runtime. I wouldn't be surprised if lots of stuff started
breaking when you mess with flags. (If I were to design an embedder, I
wouldn't even provide a "v8.setFlagsFromString()" interface, because having
one just begs for people to shoot themselves in their feet.)

On Fri, Oct 30, 2015 at 11:35 AM, Ben Noordhuis <[email protected]> wrote:

> On Fri, Oct 30, 2015 at 9:18 AM, Artem Chivchalov <[email protected]>
> wrote:
> > Thanks for answering. OK, any ways I might hack on this in an unsupported
> > way? I wish to take the risk.
>
> See below, I think it's technically possible in node.js to disable
> compaction at run-time but it's arguably a Really Bad Idea and
> pointless beside, IMO.  Scavenges and and mark-sweeps will still
> happen - and need to happen or V8 will abort the moment the new space
> is full.  You can't fully disable the garbage collector except by the
> simple expedient of not allocating in your performance-sensitive
> section.
>
>   const v8 = require('v8');
>   v8.setFlagsFromString('--never_compact');
>   doSomething();
>   v8.setFlagsFromString('--nonever_compact');
>
> --
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to