HarmonyOS OOM问题定位求助?

堆栈信息:

Js-Engine: ark
Error message: OutOfMemory when trying to allocate 3205592 bytes function name: SharedHeap::AllocateHugeObject
Cannot get SourceMap info, dump raw stack:
  Stacktrace:
    Cannot get SourceMap info, dump raw stack:
  at dealTransCommands (@hw-ailifehmos/hdpartner_plugin|@hw-ailifehmos/hdpartner_plugin|1.0.10-0|src/main/ets/connect/RemoteConnectionManager.ts:206:1)
at handleDataReceive (@hw-ailifehmos/hdpartner_plugin|@hw-ailifehmos/hdpartner_plugin|1.0.10-0|src/main/ets/connect/RemoteConnectionManager.ts:172:1)
at onDataReceive (@hw-ailifehmos/hdpartner_plugin|@hw-ailifehmos/hdpartner_plugin|1.0.10-0|src/main/ets/connect/RemoteConnectionManager.ts:99:1)
at anonymous (/usr1/hmos_for_system/src/increment/sourcecode/out/generic_generic_arm_64only/general_all_phone_standard/obj/vendor/huawei/foundation/communica

代码逻辑:

这里是因为频繁的字符操作导致了OOM问题吗?

阅读 553
1 个回答

slice方法太频繁导致,可以使用记录下标方式实现。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进