Hello all, Currently, static-vectors:free-static-vector on LispWorks is an empty function.This function should free an array allocated with static-vectors:make-static-vector.On LispWorks, static-vectors:make-static-vector uses make-array with :allocation :static.Then, what should be an appropriate definition for free-static-vector? I discovered raw::free-an-object that does what is intended. Does anyone know if there'sa better candidate for the job? Thanks and Best,Shubhamkar Ayare / digikar
Do not use raw::free-an-object because it will lead to crashes. There is no equivalent function that is safe.
If the turnover of vectors is too large for the GC to keep up then I suggest reusing them explicitly.
Do not use raw::free-an-object because it will lead to crashes. There is no equivalent function that is safe.
If the turnover of vectors is too large for the GC to keep up then I suggest reusing them explicitly. -- Martin Simmons LispWorks Ltd http://www.lispworks.com/
Thanks for the warning! And noted, we will avoid using raw::free-an-object. Reading the documentation and experimenting around a bit, it seems that LispWorks can garbage collect the static vector on its own. That's great, and in contrast to certain other implementations which require manual free-ing.
Best, Shubhamkar Ayare / digikar
On Thursday, 30 May, 2024 at 01:45:19 pm IST, shubhamayare@yahoo.co.in shubhamayare@yahoo.co.in wrote:
Hello all,
Currently, static-vectors:free-static-vector on LispWorks is an empty function. This function should free an array allocated with static-vectors:make-static-vector. On LispWorks, static-vectors:make-static-vector uses make-array with :allocation :static. Then, what should be an appropriate definition for free-static-vector?
I discovered raw::free-an-object that does what is intended. Does anyone know if there's a better candidate for the job?
Thanks and Best, Shubhamkar Ayare / digikar