public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
From: Johnny Richard <johnny@johnnyrichard.com>
To: Carlos Maniero <carlos@maniero.me>
Cc: ~johnnyrichard/olang-devel@lists.sr.ht
Subject: Re: [PATCH olang] cli: replace memory allocation malloc -> arena
Date: Tue, 27 Feb 2024 18:04:54 +0100	[thread overview]
Message-ID: <niqqb6thrxmpg2vcgrr3yy2524nlv2ou6a6ok3xakirx6bdvif@xmtgstlsxlzx> (raw)
In-Reply-To: <CZFZ74BJWC4E.1FK7O9D1KA4UD@maniero.me>

On Tue, Feb 27, 2024 at 12:44:47PM -0300, Carlos Maniero wrote:
> > diff --git a/src/0c.c b/src/0c.c
> > index 978b770..f0ac974 100644
> > --- a/src/0c.c
> > +++ b/src/0c.c
> 0c.c no longer exists
> 
> > +#define ARENA_CAPACITY (1024 * 1024)
> Can you add a TODO comment to us to remember to solve this issue in the
> feature? We can both make a algorithm to predict how much memory we
> gonna need or make arena expandable.

Do you think the following fixup is good enough?

------->8-------
Subject: [PATCH olang] fixup! cli: replace memory allocation malloc -> arena


diff --git a/src/main.c b/src/main.c
index f0ac974..2b2f12a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -25,6 +25,7 @@
 #include "lexer.h"
 #include "string_view.h"
 
+// TODO: find a better solution to define the arena capacity
 #define ARENA_CAPACITY (1024 * 1024)
 
 typedef struct cli_args

  reply	other threads:[~2024-02-27 16:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-22 19:09 Johnny Richard
2024-02-22 18:11 ` [olang/patches/.build.yml] build success builds.sr.ht
2024-02-27 15:44 ` [PATCH olang] cli: replace memory allocation malloc -> arena Carlos Maniero
2024-02-27 17:04   ` Johnny Richard [this message]
2024-02-27 23:22     ` Carlos Maniero
2024-02-28 12:40       ` Johnny Richard
2024-02-27 17:12   ` Johnny Richard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=niqqb6thrxmpg2vcgrr3yy2524nlv2ou6a6ok3xakirx6bdvif@xmtgstlsxlzx \
    --to=johnny@johnnyrichard.com \
    --cc=carlos@maniero.me \
    --cc=~johnnyrichard/olang-devel@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.johnnyrichard.com/olang.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox