MINOR: pools: prepare functions to override malloc/free in pools

This will be useful to add some debugging capabilities. For now it
changes nothing.
diff --git a/include/common/memory.h b/include/common/memory.h
index a5c0ec4..9277ab6 100644
--- a/include/common/memory.h
+++ b/include/common/memory.h
@@ -155,6 +155,23 @@
 	return p;
 }
 
+/* allocates an area of size <size> and returns it. The semantics are similar
+ * to those of malloc().
+ */
+static inline void *pool_alloc_area(size_t size)
+{
+	return malloc(size);
+}
+
+/* frees an area <area> of size <size> allocated by pool_alloc_area(). The
+ * semantics are identical to free() except that the size is specified and
+ * may be ignored.
+ */
+static inline void pool_free_area(void *area, size_t __maybe_unused size)
+{
+	free(area);
+}
+
 /*
  * Returns a pointer to type <type> taken from the pool <pool_type> or
  * dynamically allocated. In the first case, <pool_type> is updated to point to
diff --git a/src/memory.c b/src/memory.c
index b0b32e7..fc1f624 100644
--- a/src/memory.c
+++ b/src/memory.c
@@ -117,7 +117,7 @@
 		if (pool->limit && pool->allocated >= pool->limit)
 			return NULL;
 
-		ptr = malloc(pool->size + POOL_EXTRA);
+		ptr = pool_alloc_area(pool->size + POOL_EXTRA);
 		if (!ptr) {
 			pool->failed++;
 			if (failed)
@@ -163,7 +163,7 @@
 		temp = next;
 		next = *POOL_LINK(pool, temp);
 		pool->allocated--;
-		free(temp);
+		pool_free_area(temp, pool->size + POOL_EXTRA);
 	}
 	pool->free_list = next;
 	HA_SPIN_UNLOCK(POOL_LOCK, &pool->lock);
@@ -199,7 +199,7 @@
 			temp = next;
 			next = *POOL_LINK(entry, temp);
 			entry->allocated--;
-			free(temp);
+			pool_free_area(temp, entry->size + POOL_EXTRA);
 		}
 		entry->free_list = next;
 		if (entry != pool_ctx)