Skip to content
Snippets Groups Projects
  • Nikolay Shirokovskiy's avatar
    a51e5647
    misc: avoid allocations of size 0 for region · a51e5647
    Nikolay Shirokovskiy authored
    Regular region implementation supports allocations of size 0 with no
    extra efforts. It returns a non-NULL pointer in this case. However in
    case of ASAN friendly implementation it will require a special care for
    this case. Instead let's avaid allocations if size 0 for region.
    
    Also use xregion_ macros for allocations. Our current policy is to panic
    on OOM on runtime allocations.
    
    Part of tarantool/tarantool#7327
    
    NO_TEST=internal
    NO_CHANGELOG=internal
    NO_DOC=internal
    
    (cherry picked from commit 8159347d)
    a51e5647
    History
    misc: avoid allocations of size 0 for region
    Nikolay Shirokovskiy authored
    Regular region implementation supports allocations of size 0 with no
    extra efforts. It returns a non-NULL pointer in this case. However in
    case of ASAN friendly implementation it will require a special care for
    this case. Instead let's avaid allocations if size 0 for region.
    
    Also use xregion_ macros for allocations. Our current policy is to panic
    on OOM on runtime allocations.
    
    Part of tarantool/tarantool#7327
    
    NO_TEST=internal
    NO_CHANGELOG=internal
    NO_DOC=internal
    
    (cherry picked from commit 8159347d)