Christian wrote:
> On Do, 21 Mär 2019, Bram Moolenaar wrote:
> > Ah, that makes sense. Although it makes me wonder if we need this value
> > at all. We can just remove "min" and everything works.
>
> okay, so how about this then:
Yeah, that's what I also did.
> > When this fails, what are the values? Perhaps this should also use
> > assert_inrange()?
>
> function RunTheTest[40]..Test_memory_func_capture_vargs line 24:
> Expected 17548 but got 17832
>
> I am not sure why it is actually larger than expected. Also the test
> mentions:
>
> ,----
> | " In this case, garbase collecting is not needed.
> | call assert_equal(after.last, after.max)
> `----
>
> So max is larger than last. Does that mean, that garbage collection has
> already kicked in and released some memory?
It's very well possible that the system cleans up some stuff.
It's less than a 2% difference. How about this:
" Estimate the limit of max usage as 2x initial usage.
call assert_inrange(before, 2 * before, after.max)
" In this case, garbage collecting is not needed. The value might fluctuate
" a bit, allow for 3% tolerance.
call assert_inrange(after.last * 97 / 100, after.last * 103 / 100, after.max)
--
>From "know your smileys":
+<(:-) The Pope
/// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.