This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 240ebc98a6 GH-45455: [GLib] Fix returns positive memory-pool 
utilization (#45456)
240ebc98a6 is described below

commit 240ebc98a623a78a058c110a38d410686141f487
Author: Hiroyuki Sato <[email protected]>
AuthorDate: Fri Feb 7 13:23:13 2025 +0900

    GH-45455: [GLib] Fix returns positive memory-pool utilization (#45456)
    
    
    
    ### Rationale for this change
    
    Due to byte_allocated size returning 0, The TestMemoryPool-only test failed.
    This issue did not occur when running other tests together because the 
other tests use the memory pool.
    
    ### What changes are included in this PR?
    
    Allocate a ResizableBuffer in the TestMemoryPool test.
    
    ### Are these changes tested?
    
    Yes.
    
    ### Are there any user-facing changes?
    
    No.
    
    * GitHub Issue: #45455
    
    Lead-authored-by: Hiroyuki Sato <[email protected]>
    Co-authored-by: Sutou Kouhei <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 c_glib/test/test-memory-pool.rb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/c_glib/test/test-memory-pool.rb b/c_glib/test/test-memory-pool.rb
index 515edb0161..b471437208 100644
--- a/c_glib/test/test-memory-pool.rb
+++ b/c_glib/test/test-memory-pool.rb
@@ -20,6 +20,8 @@ class TestMemoryPool < Test::Unit::TestCase
 
   def setup
     @memory_pool = Arrow::MemoryPool.default
+    # Our tests assume that some memory is allocated.
+    @buffer = Arrow::ResizableBuffer.new(1)
   end
 
   def test_bytes_allocated

Reply via email to