Skip to content

Commit

Permalink
src: alloc: Remove unused functions
Browse files Browse the repository at this point in the history
src: alloc: Remove unused get memory size functions.

Signed-off-by: SaiSurya Ch <saisurya.chakkaveeravenkatanaga@amd.com>
  • Loading branch information
saisurya-ch authored and kv2019i committed Sep 11, 2024
1 parent dbe3d45 commit 9e3ad3d
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/lib/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,27 +72,6 @@ static void validate_memory(void *ptr, size_t size)
}
#endif

/* total size of block */
static inline uint32_t block_get_size(struct block_map *map)
{
uint32_t size = sizeof(*map) + map->count *
(map->block_size + sizeof(struct block_hdr));

return size;
}

/* total size of heap */
static inline uint32_t heap_get_size(struct mm_heap *heap)
{
uint32_t size = sizeof(struct mm_heap);
int i;

for (i = 0; i < heap->blocks; i++)
size += block_get_size(&heap->map[i]);

return size;
}

#if CONFIG_DEBUG_BLOCK_FREE
static void write_pattern(struct mm_heap *heap_map, int heap_depth,
uint8_t pattern)
Expand Down

0 comments on commit 9e3ad3d

Please sign in to comment.