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

builtin: use dlmalloc for -freestanding (#13054)

This commit is contained in:
playX
2022-01-06 15:10:37 +03:00
committed by GitHub
parent fb66ec7cfb
commit ec91de3504
12 changed files with 284 additions and 108 deletions

View File

@ -54,7 +54,7 @@ pub fn realloc(ptr voidptr, oldsize usize, newsize usize) voidptr {
[unsafe]
pub fn memalign(size usize, align usize) voidptr {
unsafe {
if align <= malloc_alignment {
if align <= malloc_alignment() {
return global.malloc(size)
} else {
return global.memalign(align, size)