diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | test/ruby/memory_status.rb | 6 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Thu Feb 9 16:10:34 2012 NAKAMURA Usaku <usa@ruby-lang.org> + + * test/ruby/memory_status.rb (Memory::Win32): 64bit support. + Thu Feb 9 16:08:55 2012 NAKAMURA Usaku <usa@ruby-lang.org> * ext/dl/lib/value.rb (DL::ValueUtil.{unsigned_value,signed_value}): diff --git a/test/ruby/memory_status.rb b/test/ruby/memory_status.rb index d0596ccd5e..f504c0a736 100644 --- a/test/ruby/memory_status.rb +++ b/test/ruby/memory_status.rb @@ -22,7 +22,11 @@ module Memory extend DL::Importer dlload "kernel32.dll", "psapi.dll" include DL::Win32Types - typealias "SIZE_T", "DWORD" + if [nil].pack('p').bytesize == 8 + typealias "SIZE_T", "DWORD64" + else + typealias "SIZE_T", "DWORD32" + end PROCESS_MEMORY_COUNTERS = struct [ "DWORD cb", |