Sean Conner wrote in <20240208102201.gb22...@brevard.conman.org>: |It was thus said that the Great grischka via Tinycc-devel once stated: |> On 07.02.2024 09:38, Eric Raible wrote: ... | Lua contains a way to set a custom realloc() function (via |lua_newstate()), thus allowing someone who is embedding Lua into an |application to use a custom allocator, or even just restrict the amount of |memory Lua can use. There is also a function in Lua to obtain the \ |allocator |function Lua is currently using (via lua_getallocf()).
I think the possibility to replace an allocator is a good thing. I was frustrated that one of the first things of the libressl fork was to remove that possibility (i had found lots of problems in the MUA i took maintainership of by hooking that thing), and such. I loved the old libraries, graphics and such, which per-se supported hooking their allocators. Then again, today, so many pieces of cake install on-fork, etc, handlers, use so-called sophisticated linker techniques, that whatever you do you have a bunch of things using either the standard allocator, or their very own, non-hookable thing, that you are total at odds, anyhow. As a nice counter-example, just this/last week FreeBSD introduced the split of POSIX+ systemcalls into a libsys library, and out of the standard C library. But this is a tiny drop, and non-portable it is of course, too. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) _______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel