contigmalloc panic

Barney

Member


Messages: 23

Why does a contigmalloc panic when allocating 0 bytes? A proposed patch:

if (size == 0)
rerturn NULL
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,771
Messages: 30,912

Code:
DIAGNOSTICS
     The contigmalloc() function will panic if size is zero, or if alignment
     or boundary is not a power of two.
contigmalloc(9).
 
Top