diff options
author | Takashi Kokubun <[email protected]> | 2022-07-21 09:23:58 -0700 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2022-07-21 09:42:04 -0700 |
commit | 5b21e94bebed90180d8ff63dad03b8b948361089 (patch) | |
tree | f9f7196d84b51b7a3a8001658e4391a63b71c396 /ext/-test-/memory_status | |
parent | 3ff53c8e04ecc91e0190de6d5950ecce2a2ea188 (diff) |
Expand tabs [ci skip]
[Misc #18891]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6094
Diffstat (limited to 'ext/-test-/memory_status')
-rw-r--r-- | ext/-test-/memory_status/memory_status.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/-test-/memory_status/memory_status.c b/ext/-test-/memory_status/memory_status.c index afacbee785..f124c97ca1 100644 --- a/ext/-test-/memory_status/memory_status.c +++ b/ext/-test-/memory_status/memory_status.c @@ -34,7 +34,7 @@ read_status(VALUE self) taskinfo.virtual_size = 0; taskinfo.resident_size = 0; error = task_info(mach_task_self(), flavor, - (task_info_t)&taskinfo, &out_count); + (task_info_t)&taskinfo, &out_count); if (error != KERN_SUCCESS) return Qnil; #ifndef ULL2NUM /* "long long" does not exist here, use size_t instead. */ @@ -50,7 +50,7 @@ read_status(VALUE self) PROCESS_MEMORY_COUNTERS c; c.cb = sizeof(c); if (!GetProcessMemoryInfo(GetCurrentProcess(), &c, c.cb)) - return Qnil; + return Qnil; size = SIZET2NUM(c.PagefileUsage); rss = SIZET2NUM(c.WorkingSetSize); peak = SIZET2NUM(c.PeakWorkingSetSize); @@ -68,13 +68,13 @@ Init_memory_status(void) { VALUE mMemory = rb_define_module("Memory"); cMemoryStatus = - rb_struct_define_under(mMemory, "Status", "size", + rb_struct_define_under(mMemory, "Status", "size", #ifdef HAVE_RSS - "rss", + "rss", #endif #ifdef HAVE_PEAK - "peak", + "peak", #endif - (char *)NULL); + (char *)NULL); rb_define_method(cMemoryStatus, "_update", read_status, 0); } |