From 97f8817d6bf7319f22761bd1841bf72ba8e06cbe Mon Sep 17 00:00:00 2001 From: Huang Qi Date: Mon, 24 Apr 2023 11:10:15 +0800 Subject: [PATCH] arch/sim: Implement host_freeheap for windows Signed-off-by: Huang Qi --- arch/sim/src/sim/win/sim_hostmemory.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/sim/src/sim/win/sim_hostmemory.c b/arch/sim/src/sim/win/sim_hostmemory.c index 2fe65af0a9..c1556fa738 100644 --- a/arch/sim/src/sim/win/sim_hostmemory.c +++ b/arch/sim/src/sim/win/sim_hostmemory.c @@ -41,6 +41,19 @@ void *host_allocheap(size_t sz) return _aligned_malloc(sz, 8); } +/**************************************************************************** + * Name: host_freeheap + * + * Description: + * Free a executable memory block. + * + ****************************************************************************/ + +void host_freeheap(void *mem) +{ + _aligned_free(mem); +} + void *host_allocshmem(const char *name, size_t size, int master) { HANDLE handle;