在 Rebol 中是否可以从内存中清除一些全局单词?
我知道全局字数限制在 2500 个字左右。如果我害怕达到极限,我想通过诸如未设置之类的东西来动态创建和销毁单词怎么办:这会解决风险吗?或者这根本不可能有可扩展的东西?
I know that the global words is limited to something like 2500 words. What if I fear to reach the limit, I would like to create and destroy words on the fly with something like unset: would that solve the risk or this is just impossible to have something scalable ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
限制是唯一命名的单词的数量。当然,您可以在不同的上下文中使用许多同名的单词;不影响总数,例如....
....仅向总单词列表添加五个单词(context1、context2、a、b、c)
您可以节省分配的值所占用的空间到一个单词,使用unset或none,例如:
但是单词本身的名称永远不会从全局名称中删除列表。
好消息是……
在早期版本的 REBOL 中,限制低至 2048(加上或减去一些)。它在后来的版本中有所增长。最近的 R2 版本的限制为 32,000 (ono)。 R3 接近 500,000,一旦进入测试版可能会更高。
如果您运行的是 REBOL 的早期版本,并且遇到了单词唯一名称限制,您实际上只有两个选择:
*
The limit is on the number of uniquely named words. You can of course have many words of the same name in different contexts; that does not affect the overall count, eg....
....adds only five words to the total word list (context1, context2, a, b, c)
You can save the space taken by the value assigned to a word, using unset or none, eg:
But the name of the word itself is never removed from the global name list.
The good news is .....
The limit was as low as 2048 (plus or minus a few) in earlier versions of REBOL. It has grown in later versions. Recent R2 versions have a limit of 32,000 (ono). R3 is closer to 500,000 and may go higher once it goes into beta.
If you are running on an early version of REBOL and are hitting the unique names of words limit, you really have only two choices:
*