📄 readme.linux
字号:
From: Alex Franz <alex@google.com>Date: Fri, 06 Oct 2000 16:14:03 PDTAnd, here are the details of the malloc problem that I had with the SRILM toolkit:I compiled it with gcc under Redhat Linux V. 6.2 (or thereabouts). The malloc routine has problems allocating large numbers of small pieces of memory. For me, it usually refuses to allocateany more memory once it has allocated about 600 MBytes of memory,even though the machine has 2 GBytes of real memory.This causes a problem when you are trying to build language modelswith large vocabularies. Even though I used -DUSE_SARRAY_TRIE -DUSE_SARRAYto use arrays instead of hash tables, it ran out of memory when I wastrying to use very large vocabulary sizes.The solution that worked for me was to use Wolfram Gloger's ptmalloc package for memory management instead. You can download it from http://malloc.de/en/index.html(The page suggests that it is part of the Gnu C library, but I had tocompile it myself and explicitly link it with the executables.)One more thing you can do is call the function mallopt(M_MMAP_MAX, n); with a sufficiently large n; this tells malloc to allow you toobtain a large amount of memory.------------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -