对于小型设备,有哪些 Hans Boehm GC 的替代品?

发布于 2024-07-11 05:23:42 字数 1435 浏览 3 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

飘过的浮云 2024-07-18 05:23:42

我想说你最好的选择是将 GC 移植到你的平台,有相关说明 (libgc 移植说明)。

此外,应该可以替换 GC 实现(NekoVM 常见问题解答),请参阅 vm/alloc.c 文件。

编辑

希望有用的附加链接:(未经测试)

I'd say your best option would be to port the GC to your platform, for which there are instructions (libgc porting instructions).

Additionally, it should be possible to swap out the GC implementation (NekoVM FAQ), see vm/alloc.c file.

EDIT:

Hopefully useful additional links: (untested)

挽手叙旧 2024-07-18 05:23:42

也许你最好使用 Lua,它有一个非常小但功能强大的虚拟机,有自己的虚拟机内置垃圾收集器,可以在任何支持 ANSI 标准 C 的平台上运行。只需付出一点努力,您甚至可以在缺乏标准输入和标准输出的机器上构建 Lua。 我见过 Lua 在嵌入式设备上运行,该设备是一个小型 LCD 触摸屏,背面粘有嵌入式 CPU。 Neko 是很好的作品,但我想你会发现 Lua 也同样令人满意。

Perhaps you'd be better off with Lua, which has a very small but powerful virtual machine, has its own garbage collector built in, and runs on any platform that supports ANSI Standard C. With just a little effort you can even build Lua on a machine that lacks standard input and standard output. I have seen Lua running on an embedded device that was a small LCD touch screen with an embedded CPU stuck on the back. Neko is good work, but I think you'll find Lua every bit as satisfying.

满地尘埃落定 2024-07-18 05:23:42

我可以建议 TinyGC (tinygc.sf.net) - 针对小型设备的 BoehmGC 的独立轻量级实现。 它与 BoehmGC v7+ 完全 API 兼容(甚至是二进制兼容),但仅实现了 API 的一小部分(但足以用于类似 Java/GCJ 的内存管理),并且没有自动线程和静态数据根注册。 然而,后者可能需要一些努力才能使 NekoVM 使用它(即调用 GC_register_my_thread() 和 GC_add_roots())。

I could suggest TinyGC (tinygc.sf.net) - an independent lightweight implementation of the BoehmGC targeting small devices. It is fully API-compatible (even more, binary compatible) with BoehmGC v7+ but only a small subset of the API is implemented (but sufficient for Java/GCJ-like memory management) and there is no automatic threads and static data roots registration. The latter, however, may require some efforts to make NekoVM work with it (i.e., call GC_register_my_thread() and GC_add_roots()).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文