View Issue Details

IDProjectCategoryView StatusLast Update
0000057LDMud 3.5Runtimepublic2009-01-08 08:08
ReporterlarsAssigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status newResolutionopen 
Summary0000057: Indirectly reference string literals
DescriptionIn programs, use a string literal indirection to access strings:

struct stringlit_s {
  ptrdiff_t start_index;
  size_t len;
  string_t * cache;
}

struct stringlit_s * string_literals;
unsigned char * string_literal_data;

where .start_index is an offset into string_literal_data where the .len string bytes can be found. Once a string literal has been looked up, the created string structure is stored in .cache .

A second set of these structures/types is used to store the include filenames (this could be combined with the linenumber datablock). Here it would be useful to create datablock for the filenames at the time of swap-out, so that while the object is first in memory, the filenames are not duplicated.

This way it will be possible to swap out the string literal data and include filenames instead of holding them in memory all the time. It would even possible, once the strings had been swapped out once, to create strings directly from the swap

  string_t * swap_get_string(swap_offset, len)

instead of swapping all the data back in when the program is swapped in.

Another side effect is that a GC doesn't need to keep track of a program's string literals.
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2004-05-10 12:32 lars New Issue
2009-01-08 08:08 zesstra Project LDMud 3.3 => LDMud 3.5