--- !ditz.rubyforge.org,2008-03-06/issue title: allocate all built-in strings from a single blob to reduce memory clutter desc: "" type: :task component: duk release: reporter: sva status: :unstarted disposition: creation_time: 2013-12-07 16:41:43.398530 Z references: [] id: 9989fc50339dceab1c14c50360c0a31fc48508e5 log_events: - - 2013-12-07 16:41:43.534540 Z - sva - created - "" - - 2013-12-07 18:59:11.389745 Z - sva - assigned to release v0.9 from v0.8 - "" - - 2013-12-07 19:05:55.859769 Z - sva - commented - |- init_heap_strings() could do this quite easily, but must have another helper besides duk_heap_string_intern() which takes a preallocated duk_hstring. Probably need two passes over the built-in data: first pass to compute the necessary combined size of the strings and the heap headers, and a second one to actually initialize the strings. The forced refcount of 1 and forced reachability of the strings should be enough to keep the strings from ever being freed. In any case, maybe assert for that when heap objects are freed. - - 2014-01-12 14:03:12.005805 Z - sva - assigned to release v0.10 from v0.9 - "" - - 2014-02-18 13:22:35.606593 Z - sva - unassigned from release v0.10 - ""