Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
return 0;
}
+void
+free(void *data)
+{
+ if (!data)
+ return;
+ int ret = _free(data);
+ if (ret)
+ warn_internalerror();
+}
+
// Find the amount of free space in a given zone.
u32
malloc_getspace(struct zone_s *zone)
void malloc_prepboot(void);
void *_malloc(struct zone_s *zone, u32 size, u32 align);
int _free(void *data);
+void free(void *data);
u32 malloc_getspace(struct zone_s *zone);
void malloc_sethandle(void *data, u32 handle);
void *malloc_findhandle(u32 handle);
return ret;
return memalign_tmplow(align, size);
}
-static inline void free(void *data) {
- _free(data);
-}
#endif // malloc.h