mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-10 19:31:48 +00:00
heap: diagnostic message on alloc(0)
This commit is contained in:
parent
3976a43c84
commit
1aba1fe8b1
@ -215,6 +215,9 @@ bool Heap::_unsynchronized_alloc(size_t size, void **out_addr)
|
|||||||
|
|
||||||
bool Heap::alloc(size_t size, void **out_addr)
|
bool Heap::alloc(size_t size, void **out_addr)
|
||||||
{
|
{
|
||||||
|
if (size == 0)
|
||||||
|
error("attempt to allocated zero-size block from heap");
|
||||||
|
|
||||||
/* serialize access of heap functions */
|
/* serialize access of heap functions */
|
||||||
Lock::Guard lock_guard(_lock);
|
Lock::Guard lock_guard(_lock);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user