From 71837f629e3fb0923a16897d1a499515c585dfdf Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 9 Feb 2012 07:11:23 +0000 Subject: [PATCH] * test/ruby/memory_status.rb (Memory::Win32): 64bit support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ test/ruby/memory_status.rb | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ccaf6a27af..559ab641a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Feb 9 16:10:34 2012 NAKAMURA Usaku + + * test/ruby/memory_status.rb (Memory::Win32): 64bit support. + Thu Feb 9 16:08:55 2012 NAKAMURA Usaku * 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",