阿西河

所有教程

公众号
🌙
阿西河前端的公众号

我的收藏

    最近访问  (文章)

      教程列表

      抓包专区
      测试专区

      Node.js N-API napi_adjust_external_memory

      Node.js N-API napi_adjust_external_memory

      新增于: v8.5.0 N-API version: 1 NAPI_EXTERN napi_status napi_adjust_external_memory(napi_env env, int64_t change_in_bytes, int64_t* result); [in] env: The environment that the API is invoked under. [in] change_in_bytes: The change in externally allocated memory that is kept alive by JavaScript objects. [out] result: The adjusted value Returns napi_ok if the API succeeded.

      This function gives V8 an indication of the amount of externally allocated memory that is kept alive by JavaScript objects (i.e. a JavaScript object that points to its own memory allocated by a native module). Registering externally allocated memory will trigger global garbage collections more often than it would otherwise.


      更多内容请参考:Node.js N-API,或者通过 点击对应菜单 进行查看;


      目录
      本文目录
      目录