All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] Replacing malloc and the like with GLib's variants
@ 2021-03-14  3:23 Mahmoud Mandour
  2021-03-14  3:23 ` [PATCH 1/8] bsd-user/elfload.c: Replaced calls to malloc/free with GLib variants Mahmoud Mandour
                   ` (7 more replies)
  0 siblings, 8 replies; 25+ messages in thread
From: Mahmoud Mandour @ 2021-03-14  3:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: Mahmoud Mandour

Inspired by the task in the Bite-sized tasks page, I've tried to change
some of the occurrences of malloc(), calloc(), and realloc() calls and
their respective free() calls. I also included some minor style
improvements that caused errors and warnings when supplied to the 
checkpatch.pl script.

At numerous places, the change is quite obvious. However, some other 
malloc() and the like have no immediately visible free() calls. Analysis
was done to trace the roots of each free() call to match each GLib function
with a g_free(), and every malloc(), realloc(), or calloc() call with a
call to free().

This series was resent due to some previous problems that are hopefully
resolved in this series.

Mahmoud Mandour (8):
  bsd-user/elfload.c: Replaced calls to malloc/free with GLib variants
  hw/audio/fmopl.c: Fixing some style errors
  hw/audio/fmopl.c: Replaced calls to malloc with GLib's variants
  target/xtensa: Replaced malloc/free with GLib's variants
  util/compatfd.c: Replaced a malloc with GLib's variant
  tools/virtiofsd/buffer.c: replaced a calloc call with GLib's
    g_try_new0
  tools/virtiofsd/fuse_opt.c: Replaced a malloc with GLib's g_try_malloc
  tools/virtiofsd: Replacing malloc-like calls with GLib's variants

 bsd-user/elfload.c               | 74 ++++++++++++++++----------------
 hw/audio/fmopl.c                 | 68 +++++++++++++++++------------
 target/xtensa/xtensa-isa.c       | 53 +++++++++--------------
 tools/virtiofsd/buffer.c         |  4 +-
 tools/virtiofsd/fuse_lowlevel.c  | 30 ++++++-------
 tools/virtiofsd/fuse_opt.c       |  4 +-
 tools/virtiofsd/fuse_virtio.c    | 34 +++++++--------
 tools/virtiofsd/passthrough_ll.c | 32 +++++++-------
 util/compatfd.c                  | 10 ++---
 9 files changed, 156 insertions(+), 153 deletions(-)

-- 
2.25.1



^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2021-05-25 19:03 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-14  3:23 [PATCH 0/8] Replacing malloc and the like with GLib's variants Mahmoud Mandour
2021-03-14  3:23 ` [PATCH 1/8] bsd-user/elfload.c: Replaced calls to malloc/free with GLib variants Mahmoud Mandour
2021-03-15 16:07   ` Alex Bennée
2021-03-15 16:22     ` Mahmoud Mandour
2021-03-15 17:56       ` Alex Bennée
2021-03-14  3:23 ` [PATCH 2/8] hw/audio/fmopl.c: Fixing some style errors Mahmoud Mandour
2021-03-14  3:23 ` [PATCH 3/8] hw/audio/fmopl.c: Replaced calls to malloc with GLib's variants Mahmoud Mandour
2021-03-15 16:12   ` Alex Bennée
2021-03-15 17:35     ` Mahmoud Mandour
2021-03-14  3:23 ` [PATCH 4/8] target/xtensa: Replaced malloc/free " Mahmoud Mandour
2021-03-14 15:38   ` Max Filippov
2021-03-14  3:23 ` [PATCH 5/8] util/compatfd.c: Replaced a malloc with GLib's variant Mahmoud Mandour
2021-03-15  6:10   ` Thomas Huth
2021-03-15  6:43     ` Mahmoud Mandour
2021-03-15  7:29       ` Thomas Huth
2021-03-15 16:15         ` Alex Bennée
2021-03-14  3:23 ` [PATCH 6/8] tools/virtiofsd/buffer.c: replaced a calloc call with GLib's g_try_new0 Mahmoud Mandour
2021-03-15  9:53   ` Stefan Hajnoczi
2021-05-25 19:01   ` Dr. David Alan Gilbert
2021-03-14  3:23 ` [PATCH 7/8] tools/virtiofsd/fuse_opt.c: Replaced a malloc with GLib's g_try_malloc Mahmoud Mandour
2021-03-15  9:54   ` Stefan Hajnoczi
2021-03-14  3:23 ` [PATCH 8/8] tools/virtiofsd: Replacing malloc-like calls with GLib's variants Mahmoud Mandour
2021-03-15 10:01   ` Stefan Hajnoczi
2021-03-15 10:46     ` Mahmoud Mandour
2021-03-16 17:23       ` Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.