1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vlib: use malloc_noscan() where possible (#10465)

This commit is contained in:
Uwe Krüger
2021-06-15 13:47:11 +02:00
committed by GitHub
parent af60eba5e6
commit 60c880a0cc
28 changed files with 56 additions and 83 deletions

View File

@ -243,8 +243,8 @@ pub fn new(config Config) &Picoev {
timeout_secs: config.timeout_secs
max_headers: config.max_headers
date: C.get_date()
buf: unsafe { malloc(picoev.max_fds * picoev.max_read + 1) }
out: unsafe { malloc(picoev.max_fds * picoev.max_write + 1) }
buf: unsafe { malloc_noscan(picoev.max_fds * picoev.max_read + 1) }
out: unsafe { malloc_noscan(picoev.max_fds * picoev.max_write + 1) }
}
C.picoev_add(loop, fd, int(Event.read), 0, accept_callback, pv)
go update_date(mut pv)