Expand description
Heap dump module for rune. After a successful bootstrap in which elisp code is converted to bytecode, the VM heap memory can be serialized to a rune.pdmp file, and subsequent runs can avoid bootstrapping and just load rune.pdmp instead.
The idea is based on emacsβ portable dumper (pdump) which replaced the older unexec. However, this pdmp format is a somewhat human-readable text format and makes no attempt to have any compatibility with unexec or pdump. https://lwn.net/Articles/707619/ https://github.com/emacs-mirror/emacs/blob/master/src/pdumper.h
StructsΒ§
- Dump
File π - Deserialized contents of a .pdmp file.
- Dump
State π - Dumped
Binding π - An entry in the env section: a variable binding from symbol to value.
- Dumped
Symbol π - An entry in the symbol table section: name -> (symbol object id, optional function object id)
EnumsΒ§
- Dumped
Object π - A serialized representation of a single GC object, decoupled from live pointers. Children are referenced by ObjId rather than raw addresses.
FunctionsΒ§
- dump_
to_ πfile - escape_
str π - extract_
field π - Extract value between
keyanddelim(or end of string). - fmt_
id_ πlist - load_
dump π - parse_
binding_ πline - Parse
@{sym_id} = @{val_id}. - parse_
bytefn π - parse_
dump π - parse_
field_ πref - Parse
prefix{id}from the start of s. - parse_
hex_ πbytes - parse_
object_ πline - Parse
@{id} {type} {fields...}into (ObjId, DumpedObject). - parse_
quoted_ πstring - Parse
"escaped string"and return the unescaped content. - parse_
quoted_ πstring_ rest - Parse
"escaped string" rest...returning (unescaped, rest). - parse_
ref π - Parse
@{id}returning the id. - parse_
ref_ πlist - Parse space-separated
@id @id ...list. - parse_
symbol_ πline - Parse
"name" -> @{id}or"name" -> @{id} func=@{fid}. - subr_
registry π - Registry mapping SubrFn names to their static references. Used by the loader to reconstruct function pointers from dump files. We serialize the name since Rust fn pointer names canβt be serialized, and look it up here on load.
Type AliasesΒ§
- ObjId π
- Unique id for each object pointer, used to handle cycles and sharing.