mirror of
https://github.com/vlang/v.git
synced 2025-09-14 15:02:33 +03:00
builtin,dlmalloc: fixes for v vlib/v/gen/c/coutput_test.v
for gcc14.1, which is stricter
This commit is contained in:
parent
5fbf676803
commit
6752ce8914
2 changed files with 5 additions and 3 deletions
|
@ -307,7 +307,7 @@ fn sys_dup2(oldfd int, newfd int) (i64, Errno) {
|
||||||
|
|
||||||
// 59 sys_execve
|
// 59 sys_execve
|
||||||
fn sys_execve(filename &u8, argv []&u8, envp []&u8) int {
|
fn sys_execve(filename &u8, argv []&u8, envp []&u8) int {
|
||||||
return int(sys_call3(59, u64(filename), argv.data, envp.data))
|
return int(sys_call3(59, u64(filename), u64(argv.data), u64(envp.data)))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 60 sys_exit
|
// 60 sys_exit
|
||||||
|
|
|
@ -1048,7 +1048,8 @@ fn (mut dl Dlmalloc) init_bins() {
|
||||||
|
|
||||||
@[unsafe]
|
@[unsafe]
|
||||||
fn (mut dl Dlmalloc) init_top(ptr &Chunk, size_ usize) {
|
fn (mut dl Dlmalloc) init_top(ptr &Chunk, size_ usize) {
|
||||||
offset := align_offset_usize(ptr.to_mem())
|
pmem := ptr.to_mem()
|
||||||
|
offset := align_offset_usize(usize(pmem))
|
||||||
mut p := ptr.plus_offset(offset)
|
mut p := ptr.plus_offset(offset)
|
||||||
|
|
||||||
size := size_ - offset
|
size := size_ - offset
|
||||||
|
@ -1301,7 +1302,8 @@ fn (mut dl Dlmalloc) add_segment(tbase voidptr, tsize usize, flags u32) {
|
||||||
ssize := pad_request(sizeof(Segment))
|
ssize := pad_request(sizeof(Segment))
|
||||||
mut offset := ssize + sizeof(usize) * 4 + malloc_alignment() - 1
|
mut offset := ssize + sizeof(usize) * 4 + malloc_alignment() - 1
|
||||||
rawsp := voidptr(usize(old_end) - offset)
|
rawsp := voidptr(usize(old_end) - offset)
|
||||||
offset = align_offset_usize((&Chunk(rawsp)).to_mem())
|
pmem := (&Chunk(rawsp)).to_mem()
|
||||||
|
offset = align_offset_usize(usize(pmem))
|
||||||
asp := voidptr(usize(rawsp) + offset)
|
asp := voidptr(usize(rawsp) + offset)
|
||||||
csp := if asp < voidptr(usize(old_top) + min_chunk_size()) { old_top } else { asp }
|
csp := if asp < voidptr(usize(old_top) + min_chunk_size()) { old_top } else { asp }
|
||||||
mut sp := &Chunk(csp)
|
mut sp := &Chunk(csp)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue