On Mon, 26 Feb 2024 at 09:49, Philippe Mathieu-Daudé wrote:
>
> Hi,
>
> On 26/2/24 10:06, dinglimin wrote:
> > Signed-off-by: dinglimin
> > ---
> > semihosting/uaccess.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/semihosting/uaccess.c
On Mon, Feb 26, 2024 at 10:48:14AM +0100, Philippe Mathieu-Daudé wrote:
> Hi,
>
> On 26/2/24 10:06, dinglimin wrote:
> > Signed-off-by: dinglimin
> > ---
> > semihosting/uaccess.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/semihosting/uaccess.c
On Mon, Feb 26, 2024 at 05:06:28PM +0800, dinglimin wrote:
> Date: Mon, 26 Feb 2024 17:06:28 +0800
> From: dinglimin
> Subject: [PATCH] semihosting/uaccess.c: Replaced a malloc call with g_malloc
> X-Mailer: git-send-email 2.30.0.windows.2
>
> Signed-off-by: dinglimin
&g
Hi,
On 26/2/24 10:06, dinglimin wrote:
Signed-off-by: dinglimin
---
semihosting/uaccess.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/semihosting/uaccess.c b/semihosting/uaccess.c
index dc587d73bc..7788ead9b2 100644
--- a/semihosting/uaccess.c
+++
Signed-off-by: dinglimin
---
semihosting/uaccess.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/semihosting/uaccess.c b/semihosting/uaccess.c
index dc587d73bc..7788ead9b2 100644
--- a/semihosting/uaccess.c
+++ b/semihosting/uaccess.c
@@ -14,10 +14,10 @@
void
On Thu, 27 Jul 2023 at 15:56, Peter Maydell wrote:
> The only real reason is just consistency -- the project uses
> the glib malloc wrappers, and in theory any use of raw
> malloc() ought to be either:
> * something that's third party library code (eg libdecnumber)
> * because it's going into a
On Fri, 28 Jul 2023 at 11:50, dinglimin wrote:
>
> Replaced a call to malloc() and its respective call to free() with g_malloc()
> and g_free().
>
> Signed-off-by: dinglimin
>
> v4 -> V5:Use g_try_malloc() instead of malloc()
> V3 -> V4:Delete null checks after g malloc().
> V2 ->
Replaced a call to malloc() and its respective call to free() with g_malloc()
and g_free().
Signed-off-by: dinglimin
v4 -> V5:Use g_try_malloc() instead of malloc()
V3 -> V4:Delete null checks after g malloc().
V2 -> V3:softmmu_unlock_user changes free to g free.
V1 -> V2:if
On Fri, 28 Jul 2023 at 06:13, dinglimin wrote:
>
> Replaced a call to malloc() and its respective call to free() with g_malloc()
> and g_free().
>
> Signed-off-by: dinglimin
>
> v4 -> V5:Use g_try_malloc() instead of malloc()
> V3 -> V4:Delete null checks after g malloc().
> V2 ->
Replaced a call to malloc() and its respective call to free() with g_malloc()
and g_free().
Signed-off-by: dinglimin
v4 -> V5:Use g_try_malloc() instead of malloc()
V3 -> V4:Delete null checks after g malloc().
V2 -> V3:softmmu_unlock_user changes free to g free.
V1 -> V2:if
On 7/27/23 08:04, Daniel P. Berrangé wrote:
On Thu, Jul 27, 2023 at 03:56:23PM +0100, Peter Maydell wrote:
On Wed, 26 Jul 2023 at 16:21, Richard Henderson
wrote:
On 7/26/23 02:43, Peter Maydell wrote:
(Something went wrong with the quoting in your email. I've
fixed it up.)
On Wed, 26 Jul
On Thu, Jul 27, 2023 at 03:56:23PM +0100, Peter Maydell wrote:
> On Wed, 26 Jul 2023 at 16:21, Richard Henderson
> wrote:
> >
> > On 7/26/23 02:43, Peter Maydell wrote:
> > > (Something went wrong with the quoting in your email. I've
> > > fixed it up.)
> > >
> > > On Wed, 26 Jul 2023 at 05:38,
On Wed, 26 Jul 2023 at 16:21, Richard Henderson
wrote:
>
> On 7/26/23 02:43, Peter Maydell wrote:
> > (Something went wrong with the quoting in your email. I've
> > fixed it up.)
> >
> > On Wed, 26 Jul 2023 at 05:38, wrote:
> >> Peter Maydell wrote:
> >>> The third part here, is that g_malloc()
On 7/26/23 02:43, Peter Maydell wrote:
(Something went wrong with the quoting in your email. I've
fixed it up.)
On Wed, 26 Jul 2023 at 05:38, wrote:
Peter Maydell wrote:
The third part here, is that g_malloc() does not ever
fail -- it will abort() on out of memory. However
the code here is
(Something went wrong with the quoting in your email. I've
fixed it up.)
On Wed, 26 Jul 2023 at 05:38, wrote:
> Peter Maydell wrote:
> > The third part here, is that g_malloc() does not ever
> > fail -- it will abort() on out of memory. However
> > the code here is still handling g_malloc()
Replaced a call to malloc() and its respective call to free() with g_malloc()
and g_free().
Signed-off-by: dinglimin
V3 -> V4:Delete null checks after g malloc().
g_malloc() is preferred more than g_try_* functions, which return NULL on error,
when the size of the requested allocation is
; (which we want
> here, because the guest is passing us the length of memory
> to try to allocate) is g_try_malloc().
>
> thanks
> -- PMM
g_malloc() is preferred more than g_try_* functions, which return NULL on error,
when the size of the requested allocation is small.
This is because
Replaced a call to malloc() and its respective call to free() with g_malloc()
and g_free().
Signed-off-by: dinglimin
V2 -> V3:softmmu_unlock_user changes free to g free.
V1 -> V2:if cpu_memory_rw_debug failed, still need to set p=NULL
---
semihosting/uaccess.c | 6 +++---
1 file changed, 3
On Tue, 25 Jul 2023 at 10:13, Michael Tokarev wrote:
>
> 25.07.2023 12:00, dinglimin wrote:
> > Replaced a call to malloc() and its respective call to free() with
> > g_malloc() and g_free().
> >
> > Signed-off-by: dinglimin
> >
> > V1 -> V2:if cpu_memory_rw_debug failed, still need to set
25.07.2023 12:00, dinglimin wrote:
Replaced a call to malloc() and its respective call to free() with g_malloc()
and g_free().
Signed-off-by: dinglimin
V1 -> V2:if cpu_memory_rw_debug failed, still need to set p=NULL
---
semihosting/uaccess.c | 4 ++--
1 file changed, 2 insertions(+), 2
Replaced a call to malloc() and its respective call to free() with g_malloc()
and g_free().
Signed-off-by: dinglimin
V1 -> V2:if cpu_memory_rw_debug failed, still need to set p=NULL
---
semihosting/uaccess.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
25.07.2023 11:06, dinglimin wrote:
Replaced a call to malloc() and its respective call to free() with g_malloc()
and g_free().
...
void *softmmu_lock_user(CPUArchState *env, target_ulong addr,
target_ulong len, bool copy)
{
-void *p = malloc(len);
+void
Replaced a call to malloc() and its respective call to free() with g_malloc()
and g_free().
Signed-off-by: dinglimin
---
semihosting/uaccess.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/semihosting/uaccess.c b/semihosting/uaccess.c
index 8018828069..8f2e6f63ee
23 matches
Mail list logo