v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

User talk:Rick/Memory research

From Dwarf Fortress Wiki
< User talk:Rick
Revision as of 18:13, 8 November 2007 by Rick (talk | contribs)
Jump to navigation Jump to search

Voodoo

Hi Rick,
you may be interested in the "Voodoo" section on my user talk page.
0x517A5D 01:28, 8 November 2007 (EST)

Thanks for the info, though it wasn't necessary. :) --Rick 04:59, 8 November 2007 (EST)
So you found something similar, or you just intend to rediscover/recompile for each new version? Not being snarky here, honestly curious.
0x517A5D 12:42, 8 November 2007 (EST)
There are easier ways, yes. --Rick 13:13, 8 November 2007 (EST)

Suspend

On another topic, I was looking at reveal's main.cpp and saw a bug. You're not suspending/resuming the process. The problem is that process handles are not thread handles, and SuspendThread() and friends use thread handles. You do this:

GetWindowThreadProcessId(window, &pid);
[...]
SuspendThread(process);
cleanMap(process);
ResumeThread(process);
CloseHandle(process);

But you need to do something like this:

thread = GetWindowThreadProcessId(window, &pid);
[...]
SuspendThread(thread);
cleanMap(process);
ResumeThread(thread);
CloseHandle(thread);
CloseHandle(process);


0x517A5D 12:42, 8 November 2007 (EST)

That's probably a leftover from having old code laying around, I know I fixed this in some other tools but forgot to update older ones. Thanks! --Rick 13:08, 8 November 2007 (EST)