File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -201,13 +201,14 @@ load(Module) ->
201201 end .
202202
203203% % @doc Estimate the required native code for a given bytecode size.
204- % % Currently, the only live stream backend is mmap which needs this estimate
205- % % and should not be passed a value too large to not slow down valgrind too
206- % % much during tests. A factor of 20 is more than enough, the ratio is closer
207- % % to 9 on x86-64.
208- % % This will need some rework once we start using flash on MCUs.
204+ % % Currently, the only live stream backend that needs estimate is mmap
205+ % % and it should not be passed a value too large to not slow down valgrind too
206+ % % much during tests. A factor of 32 is more than enough, the largest observed
207+ % % ration is 21 for aarch64 and Elixir code. Also apply a minimum of 128 kb
208+ % % which shouldn't affect valgrind too much.
209+ % % jit_stream_flash and jit_stream_binary ignore the size parameter.
209210% % @return size in bytes
210211% % @param Size bytecode size
211212-spec jit_mmap_size (pos_integer ()) -> pos_integer ().
212213jit_mmap_size (Size ) ->
213- Size * 20 .
214+ max ( Size * 32 , 128 * 1024 ) .
You can’t perform that action at this time.
0 commit comments