* Add new hash function eina_hash_murmur3 that should be better at
hashing strings.
+
+2011-12-02 Mike Blumenkrantz (discomfitor/zmike)
+
+ * Add eina_mempool_calloc for returning zeroed memory
+Eina 1.2.0
+
+Changes since Eina 1.1.0:
+-------------------------
+
+Additions:
+
+ * eina_mempool_calloc
+
+
Eina 1.1.0
Changes since Eina 1.0.0:
#ifndef EINA_INLINE_MEMPOOL_X_
#define EINA_INLINE_MEMPOOL_X_
+#include <string.h>
+
/**
* @addtogroup Eina_Memory_Pool_Group Memory Pool
*
}
/**
+ * @brief Allocate and zero a amount memory by the given mempool.
+ *
+ * @param mp The mempool.
+ * @param size The size in bytes to allocate.
+ * @return The newly allocated data.
+ *
+ * This function allocates @p size bytes, using the mempool @p mp and
+ * returns the allocated data after zeroing it. If not used anymore,
+ * the data must be freed with eina_mempool_free(). No check is done on @p mp,
+ * so it must be a valid mempool.
+ */
+static inline void *
+eina_mempool_calloc(Eina_Mempool *mp, unsigned int size)
+{
+ void *r = mp->backend.alloc(mp->backend_data, size);
+ if (!r) return NULL;
+ memset(r, 0, size);
+ return r;
+}
+
+/**
* @brief Free the allocated ressources by the given mempool.
*
* @param mp The mempool.