Skip to content
  • KOBAYASHI Shuji's avatar
    a2df2470
    Introduce `mrb_ssize` type for buffer size on memory; ref #4483 · a2df2470
    KOBAYASHI Shuji authored
    Previously, `mrb_int` was used as the type that represents the buffer size
    on memory, but the sizes of `RString` and `RArray` exceed 6 words when
    `MRB_INT64` is enabled on 32-bit CPU.
    
    I don't think it is necessary to be able to represent the buffer size on
    memory that exceeds the virtual address space. Therefore, for this purpose,
    introduce `mrb_ssize` which doesn't exceed the sizes of `mrb_int` and
    pointer.
    
    I think all `mrb_int` used for this purpose should be changed to
    `mrb_ssize`, but currently only the members of the structures (`RString`,
    `mrb_shared_string`, `RArray` and `mrb_shared_array`) are changed.
    a2df2470
    Introduce `mrb_ssize` type for buffer size on memory; ref #4483
    KOBAYASHI Shuji authored
    Previously, `mrb_int` was used as the type that represents the buffer size
    on memory, but the sizes of `RString` and `RArray` exceed 6 words when
    `MRB_INT64` is enabled on 32-bit CPU.
    
    I don't think it is necessary to be able to represent the buffer size on
    memory that exceeds the virtual address space. Therefore, for this purpose,
    introduce `mrb_ssize` which doesn't exceed the sizes of `mrb_int` and
    pointer.
    
    I think all `mrb_int` used for this purpose should be changed to
    `mrb_ssize`, but currently only the members of the structures (`RString`,
    `mrb_shared_string`, `RArray` and `mrb_shared_array`) are changed.
Loading