lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Yes, by "reference counting" is really whatever I've in mind.

And if it's OK for others, I'm quite happy to make contributions to Lua 5.4 directly.

Since GC is already widely used and accepted, I just don't think I have the right to force others to get rid of the way of thinking in GC.

So whatever I do now is: provide a switch for users to use GC or disable it (then use reference counting, and default is GC enabled).

I need help to get a better understanding on where to apply reference counting (where to increase reference count and where to decrease reference count).

Could anyone help me to point out the most important places?

I think this would save a lot of time finding that places among code lines.



BR,
Yilin



From: Ranier Vilela <ranier.vf@gmail.com>
Sent: Tuesday, October 6, 2020 1:13 PM
To: Lua mailing list <lua-l@lists.lua.org>
Subject: Re: I need some help on some ideas
 
Em ter., 6 de out. de 2020 às 07:14, yyl_20050115@hotmail.com <yyl_20050115@hotmail.com> escreveu:
Hi dear lua list members,

About 2 months ago, I started working on a new algorithm for c++ to do memory management by reference counting algorithm.
That project was successfully completed.

Later, I was seeking for another use case, and then I found Lua.
Lua is small and elegant, pure c implemented and therefore most portable.

I want to code the algorithm into a custom version of Lua to make it support reference counting.

And I'm already working on it now (based on Lua 5.4).

The problem I've encountered is, I'm not sure where to change: I'm still learning lua, both the language and the implementation.

Would you please kindly help me to point out where I should notice while coding this algorithm?
While I haven't fully understood your project, I have some considerations.
Why not try, improve Lua 5.4, suggesting real improvements, such as this "by reference counting"?
It could also be a project, which integrates the libraries you created, directly to Lua 5.4.
Lua already has problems with fragmentation. We need everyone to adopt Lua 5.4 as soon as possible.

regards,
Ranier Vilela