summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix-helpers.c
diff options
context:
space:
mode:
authorXavi Hernandez <xhernandez@redhat.com>2019-06-21 11:28:08 +0200
committerAtin Mukherjee <amukherj@redhat.com>2019-06-26 08:57:42 +0000
commit1716a907da1a835b658740f1325033d7ddd44952 (patch)
treeaea3592d103ce087aecfb124955bb4750a678144 /xlators/storage/posix/src/posix-helpers.c
parentdc1b87fcfef08c9497b0c02b2410c9d18bbc2dba (diff)
core: fix memory allocation issues
Two problems have been identified that caused that gluster's memory usage were twice higher than required. 1. An off by 1 error caused that all objects allocated from the memory pools were taken from a pool bigger than required. Since each pool corresponds to a size equal to a power of two, this was wasting half of the available memory. 2. The header information used for accounting on each memory object was not taken into consideration when searching for a suitable memory pool. It was added later when each individual block was allocated. This made this space "invisible" to memory accounting. Credits: Thanks to Nithya Balachandran for identifying this problem and testing this patch. Fixes: bz#1722802 Change-Id: I90e27ad795fe51ca11c13080f62207451f6c138c Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix-helpers.c')
0 files changed, 0 insertions, 0 deletions