mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-23 15:32:25 +00:00
parent
149bd999f3
commit
36af114d78
@ -25,9 +25,19 @@ void * krealloc(const void * p,size_t new_size,gfp_t flags)
|
||||
if (!new_size) {
|
||||
kfree(p);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
lx_emul_trace_and_stop(__func__);
|
||||
} else {
|
||||
|
||||
unsigned long const old_size = ksize(p);
|
||||
void *ret;
|
||||
|
||||
if (new_size <= old_size)
|
||||
return p;
|
||||
|
||||
ret = kmalloc(new_size, flags);
|
||||
memcpy(ret, p, old_size);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user