From a8d479c63a4bbc99808a37f6958b3de517569918 Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Thu, 16 Oct 2014 18:05:08 +1100 Subject: Rename mem_size() to mem_allocated_size() This better states the intention of what it should return. I was bit unsure when fixing mem_size(), so hopefully this makes future me (or other people) less unsure as to the intended return value of this function. No functional changes, just rename. Signed-off-by: Stewart Smith Acked-by: Rusty Russell --- core/mem_region.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/mem_region.c') diff --git a/core/mem_region.c b/core/mem_region.c index dd1f64f..10404f5 100644 --- a/core/mem_region.c +++ b/core/mem_region.c @@ -396,7 +396,7 @@ void mem_free(struct mem_region *region, void *mem, const char *location) make_free(region, (struct free_hdr *)hdr, location); } -size_t mem_size(const struct mem_region *region __unused, const void *ptr) +size_t mem_allocated_size(const void *ptr) { const struct alloc_hdr *hdr = ptr - sizeof(*hdr); return hdr->num_longs * sizeof(long) - sizeof(struct alloc_hdr); -- cgit v1.1