From bcc41c081a43a68042c4757a6569cb690098d9b8 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Fri, 17 Aug 2012 14:32:04 +0400 Subject: Add a utility function for patching read-only memory. --- Lua API.html | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Lua API.html') diff --git a/Lua API.html b/Lua API.html index 2c9a6a8d..7dfc7df0 100644 --- a/Lua API.html +++ b/Lua API.html @@ -1409,6 +1409,11 @@ global environment, persistent between calls to the script.

  • dfhack.internal.getMemRanges()

    Returns a sequence of tables describing virtual memory ranges of the process.

  • +
  • dfhack.internal.patchMemory(dest,src,count)

    +

    Like memmove below, but works even if dest is read-only memory, e.g. code. +If destination overlaps a completely invalid memory region, or another error +occurs, returns false.

    +
  • dfhack.internal.memmove(dest,src,count)

    Wraps the standard memmove function. Accepts both numbers and refs as pointers.

  • -- cgit v1.2.1