From: Matt Benjamin Date: Sat, 19 Dec 2015 23:32:42 +0000 (-0500) Subject: cohort_lru: use correct new/delete operator pair X-Git-Tag: v10.1.0~382^2~85 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b19912c9b21a3892ef56009616d0e6f518607502;p=ceph.git cohort_lru: use correct new/delete operator pair Signed-off-by: Matt Benjamin --- diff --git a/src/common/cohort_lru.h b/src/common/cohort_lru.h index cdabb1e5bef8..2f83b4230556 100644 --- a/src/common/cohort_lru.h +++ b/src/common/cohort_lru.h @@ -284,7 +284,7 @@ namespace cohort { ~Partition() { if (csz) - delete[] cache; + ::operator delete(cache); } }; @@ -323,7 +323,7 @@ namespace cohort { Partition& p = part[ix]; if (csz) { p.csz = csz; - p.cache = (T**) calloc(csz, sizeof(T*)); + p.cache = (T**) ::operator new(csz * sizeof(T*)); } locks.push_back(&p.lock); }