Skip to content
Commit 7458b054 authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov
Browse files

rst-malloc: return aligned pointers to sizeof(void *) (v4)



Stas found that if we don't align a pointer,
futex and atomic operations can fail.

v2: don't hard-code the size of void *
v3: add a function to allocate memory without gaps with
    a privious slice. It's used to allocate arrays.
v4: don't change rst_mem_cpos

Cc: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: default avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: default avatarPavel Emelyanov <xemul@virtuozzo.com>
parent b09356f4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment