lua-users home
lua-l archive

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


It was thus said that the Great HyperHacker once stated:
> With 5.2 getting so near completion, I feel it's worth bringing up a
> couple small enhancement ideas I had in hopes they might be considered
> for inclusion in the official release:

  One feature I would like is the ability to say "this string should *not*
be interred within Lua, but a pointer to it certainly can".  

  I have one project (a personal project so far) that stores just filenames
in a single large file and it would be nice if I could tell Lua to use just
a pointer into this pool instead of interring it.  It seems like a waste,
since the strings are already all in memory (via mmap()) and won't be going
away (the file is mapped as read-only) as the program runs.

  Such a feature would also help with another program (the one that found
this bug: http://www.lua.org/bugs.html#5.1.4-6) that generates a ton of
strings when running.  

  It could also help a bit on embedded systems as the lua_pushliteral()
function could take advantage of this feature as well.

  -spc (Just some thoughts ... )