diff --git a/mu.arc b/mu.arc index 239927d8..7a2c4d90 100644 --- a/mu.arc +++ b/mu.arc @@ -452,7 +452,7 @@ (def new-array (type size) ;? (prn "new array: @type @size") (ret result Memory-in-use-until - (++ Memory-in-use-until (* (sizeof types*.type!elem) size)))) + (++ Memory-in-use-until (+ 1 (* (sizeof types*.type!elem) size))))) (def sizeof (type) (if (~or types*.type!record types*.type!array) diff --git a/mu.arc.t b/mu.arc.t index bc8e4073..7f9e1042 100644 --- a/mu.arc.t +++ b/mu.arc.t @@ -802,7 +802,7 @@ ;? (prn memory*) (if (~iso memory*.1 before) (prn "F - 'new' on array with literal size returns current high-water mark")) - (if (~iso Memory-in-use-until (+ before 5)) + (if (~iso Memory-in-use-until (+ before 6)) (prn "F - 'new' on primitive arrays increments high-water mark by their size"))) (reset) @@ -816,7 +816,7 @@ ;? (prn memory*) (if (~iso memory*.2 before) (prn "F - 'new' on array with variable size returns current high-water mark")) - (if (~iso Memory-in-use-until (+ before 5)) + (if (~iso Memory-in-use-until (+ before 6)) (prn "F - 'new' on primitive arrays increments high-water mark by their (variable) size"))) (reset)