Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of memory #35

Open
xianjimli opened this issue Feb 6, 2020 · 4 comments
Open

Out of memory #35

xianjimli opened this issue Feb 6, 2020 · 4 comments

Comments

@xianjimli
Copy link

0: ExitFrame [pc: 0x2cd055041bd]

Security context: 0x3c146121e6c9
1: push [0x3c1461205449](this=0x3c14e6e825a1 <JSArray[1210033]>,0x3c14ed885719 <JSArray[48]>)
2: getChunks(aka getChunks) [0x3c143f66a319] [/Users/jim/Share/lab/gui/awtk/awtk/tools/word_gen/node_modules/segment/lib/module/DictTokenizer.js:~277] [pc=0x2cd05a10c20](this=0x3c1472f022e1 ,wordpos=0x3c1470b02311 ,pos=...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x100033c31 node::Abort() [/usr/local/bin/node]
2: 0x1000353ea node::FatalTryCatch::~FatalTryCatch() [/usr/local/bin/node]
3: 0x10019bc9a v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
4: 0x10056a072 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/usr/local/bin/node]
5: 0x100569029 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/local/bin/node]
6: 0x100566cb8 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/bin/node]
7: 0x1005659c8 v8::internal::Heap::HandleGCRequest() [/usr/local/bin/node]
8: 0x100519708 v8::internal::StackGuard::HandleInterrupts() [/usr/local/bin/node]
9: 0x1007caf01 v8::internal::Runtime_StackGuard(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]
10: 0x2cd055041bd
11: 0x2cd05a51454

@bluelovers
Copy link

@xianjimli
Copy link
Author

試試
https://github.com/bluelovers/node-segment

好的,谢谢

@darkty2009
Copy link

测试用例:

// 载入模块
var Segment = require('segment');
// 创建实例
var segment = new Segment();
// 使用默认的识别模块及字典,载入字典文件需要1秒,仅初始化时执行一次即可
segment.useDefault();
 
// 开始分词
console.log(segment.doSegment('一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十'));

然后就内存泄漏了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants