mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
markused: fix ./v -skip-unused -cc gcc -keepc -freestanding -o bel vlib/os/bare/bare_example_linux.v
This commit is contained in:
parent
d9fe2edc41
commit
e29f6d1393
@ -1189,7 +1189,7 @@ fn (mut dl Dlmalloc) tmalloc_large(size usize) voidptr {
|
|||||||
mut t := *dl.treebin_at(idx)
|
mut t := *dl.treebin_at(idx)
|
||||||
if !isnil(t) {
|
if !isnil(t) {
|
||||||
mut sizebits := size << leftshift_for_tree_index(idx)
|
mut sizebits := size << leftshift_for_tree_index(idx)
|
||||||
mut rst := nil
|
mut rst := voidptr(0)
|
||||||
for {
|
for {
|
||||||
csize := t.chunk().size()
|
csize := t.chunk().size()
|
||||||
if csize >= size && csize - size < rsize {
|
if csize >= size && csize - size < rsize {
|
||||||
@ -1412,7 +1412,7 @@ pub fn (mut dl Dlmalloc) memalign(alignment_ usize, bytes usize) voidptr {
|
|||||||
// we've allocated enough total room so that this is always possible
|
// we've allocated enough total room so that this is always possible
|
||||||
br_ := (usize(mem) + alignment - 1) & (~alignment + 1)
|
br_ := (usize(mem) + alignment - 1) & (~alignment + 1)
|
||||||
br := chunk_from_mem(voidptr(br_))
|
br := chunk_from_mem(voidptr(br_))
|
||||||
mut pos := nil
|
mut pos := voidptr(0)
|
||||||
if usize(br) - usize(p) > min_chunk_size() {
|
if usize(br) - usize(p) > min_chunk_size() {
|
||||||
pos = voidptr(br)
|
pos = voidptr(br)
|
||||||
} else {
|
} else {
|
||||||
|
@ -21,6 +21,7 @@ pub fn mark_used(mut table ast.Table, pref &pref.Preferences, ast_files []&ast.F
|
|||||||
'format_sb',
|
'format_sb',
|
||||||
'__new_array_with_default',
|
'__new_array_with_default',
|
||||||
'__new_array_with_array_default',
|
'__new_array_with_array_default',
|
||||||
|
'init_global_allocator' /* needed for linux_bare and wasm_bare */,
|
||||||
'v_realloc' /* needed for _STR */,
|
'v_realloc' /* needed for _STR */,
|
||||||
'malloc',
|
'malloc',
|
||||||
'malloc_noscan',
|
'malloc_noscan',
|
||||||
|
Loading…
Reference in New Issue
Block a user