diff options
author | Niels de Vos <ndevos@redhat.com> | 2016-08-06 16:04:29 +0200 |
---|---|---|
committer | Kaushal M <kaushal@redhat.com> | 2016-10-03 05:16:44 -0700 |
commit | 2cee4a3e47518aeb28ac2b611c6f01c0f9d00dab (patch) | |
tree | 4b3cbd929d542233354917121e59551ab8d1540a /glusterfs-hadoop | |
parent | fee92f7c6abc651e88a8b52d5187286a4b8df2c3 (diff) |
libglusterfs: add gf_get_mem_type()
gfapi needs to provide a function towards applications to free memory
that it allocated. Depending on how the application is compiled/linked,
it could use a different memory allocator than Gluster itself. Therefore
it is not safe for gfapi to request applications to free memory with
'standard' free().
Examples for this are Gluster allocated structures with GF_CALLOC() when
memory accounting is enabled (the default). Some gfapi functions use
malloc() to allocate memory as a workaround, but the free() from the
jemalloc implementation should not be combined with the malloc() from
glibc.
Cherry picked from commit db4e26ed71a01e5f760fbc3c7051962426f102c9:
> Change-Id: I626cd1a60abf8965f9263290f4045d1f69fc2093
> BUG: 1344714
> Signed-off-by: Niels de Vos <ndevos@redhat.com>
> Reviewed-on: http://review.gluster.org/15108
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: soumya k <skoduri@redhat.com>
> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Change-Id: I626cd1a60abf8965f9263290f4045d1f69fc2093
BUG: 1347715
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/15601
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Kaushal M <kaushal@redhat.com>
Diffstat (limited to 'glusterfs-hadoop')
0 files changed, 0 insertions, 0 deletions