summaryrefslogtreecommitdiff
path: root/mbld
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-12-01 02:25:04 -0800
committerOri Bernstein <ori@eigenstate.org>2015-12-01 02:25:04 -0800
commitcf81dd19f0c898fa6036d1f88cbe822eb8a2b4bf (patch)
tree87e96fb673c939e3ee76fe9065e09af572b44956 /mbld
parent52a5be5adc041a5dc8daa1238a1f307c728e75c8 (diff)
downloadmc-cf81dd19f0c898fa6036d1f88cbe822eb8a2b4bf.tar.gz
Reduce mbld memory leakage.
Diffstat (limited to 'mbld')
-rw-r--r--mbld/deps.myr4
-rw-r--r--mbld/types.myr1
2 files changed, 3 insertions, 2 deletions
diff --git a/mbld/deps.myr b/mbld/deps.myr
index c8790e3..5ce5876 100644
--- a/mbld/deps.myr
+++ b/mbld/deps.myr
@@ -237,6 +237,7 @@ const getcflags = {ln, cflags, libs
cflags = std.slpush(cflags, std.sldup(fl))
;;
std.slfree(flags)
+ regex.matchfree(m)
;;
match regex.exec(clibpat, ln)
@@ -247,6 +248,7 @@ const getcflags = {ln, cflags, libs
libs = std.slpush(libs, std.sldup(fl))
;;
std.slfree(flags)
+ regex.matchfree(m)
;;
-> (cflags, libs)
}
@@ -299,6 +301,7 @@ const depname = {deps, ln, lnum
else
deps = std.slpush(deps, `Local (std.sldup(uses[3]), lnum))
;;
+ regex.matchfree(uses)
| `std.None:
/* nothing to do */
;;
@@ -381,7 +384,6 @@ const pushdep = {dg, src, dst
if opt_debug
std.put("{} <= {}\n", dst, src)
;;
- std.assert(dst.len < 200, "BUG!")
sl = std.htgetv(dg.deps, dst, [][:])
sl = std.slpush(sl, src)
std.htput(dg.deps, dst, sl)
diff --git a/mbld/types.myr b/mbld/types.myr
index b6edca9..b4f9e7a 100644
--- a/mbld/types.myr
+++ b/mbld/types.myr
@@ -62,7 +62,6 @@ pkg bld =
;;
type depgraph = struct
- roots : byte[:][:]
deps : std.htab(byte[:], byte[:][:])#
libs : std.htab(byte[:], byte[:][:])#
input : std.htab(byte[:], byte[:])#