[PATCH v3 12/32] Mini-OS: add EXPORT_SYMBOL() instances to lib/xmalloc.c

Juergen Gross posted 32 patches 2 years, 2 months ago
[PATCH v3 12/32] Mini-OS: add EXPORT_SYMBOL() instances to lib/xmalloc.c
Posted by Juergen Gross 2 years, 2 months ago
Add the needed instances of EXPORT_SYMBOL() to lib/xmalloc.c.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
V3:
- new patch
---
 lib/xmalloc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/xmalloc.c b/lib/xmalloc.c
index e16f161a..cc5db11e 100644
--- a/lib/xmalloc.c
+++ b/lib/xmalloc.c
@@ -271,6 +271,7 @@ void *malloc(size_t size)
 {
     return _xmalloc(size, DEFAULT_ALIGN);
 }
+EXPORT_SYMBOL(malloc);
 
 void *realloc(void *ptr, size_t size)
 {
@@ -301,11 +302,13 @@ void *realloc(void *ptr, size_t size)
 
     return new;
 }
+EXPORT_SYMBOL(realloc);
 
 void free(void *ptr)
 {
     xfree(ptr);
 }
+EXPORT_SYMBOL(free);
 #endif
 
 /*
-- 
2.35.3
Re: [PATCH v3 12/32] Mini-OS: add EXPORT_SYMBOL() instances to lib/xmalloc.c
Posted by Samuel Thibault 2 years, 2 months ago
Juergen Gross, le lun. 27 nov. 2023 11:25:03 +0100, a ecrit:
> Add the needed instances of EXPORT_SYMBOL() to lib/xmalloc.c.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

> ---
> V3:
> - new patch
> ---
>  lib/xmalloc.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/lib/xmalloc.c b/lib/xmalloc.c
> index e16f161a..cc5db11e 100644
> --- a/lib/xmalloc.c
> +++ b/lib/xmalloc.c
> @@ -271,6 +271,7 @@ void *malloc(size_t size)
>  {
>      return _xmalloc(size, DEFAULT_ALIGN);
>  }
> +EXPORT_SYMBOL(malloc);
>  
>  void *realloc(void *ptr, size_t size)
>  {
> @@ -301,11 +302,13 @@ void *realloc(void *ptr, size_t size)
>  
>      return new;
>  }
> +EXPORT_SYMBOL(realloc);
>  
>  void free(void *ptr)
>  {
>      xfree(ptr);
>  }
> +EXPORT_SYMBOL(free);
>  #endif
>  
>  /*
> -- 
> 2.35.3
> 

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.