aboutsummaryrefslogtreecommitdiffhomepage
path: root/mem.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-06-04 13:15:15 +0200
committerlemon <lsof@mailbox.org>2023-06-04 13:15:15 +0200
commitd8f63a7c8f9ec6c1213e219d4b6d5d30ce595cdd (patch)
tree84f2f383fcd129332b3a0a6a7bb85666e7569934 /mem.c
parent45cd3d8d6eeccc42f7e0b23f7871b29f3ce6f7e7 (diff)
evaluate call args backwards
Diffstat (limited to 'mem.c')
-rw-r--r--mem.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mem.c b/mem.c
index 07519d5..3a22a35 100644
--- a/mem.c
+++ b/mem.c
@@ -67,6 +67,14 @@ vpushn_(void **p, int *pcap, uint *pn, uint siz, const void *dat, uint ndat)
return beg;
}
+void
+vresize_(void **p, int *pcap, uint *pn, uint siz, uint N)
+{
+ while (*pcap < N)
+ vpush_(p, pcap, pn, siz);
+ *pn = N;
+}
+
struct arena *
newarena(uint chunksiz)
{