|
From: Phillip S. <ps...@cf...> - 2001-10-14 15:17:02
|
Allocating 0 bytes is a useful idiom, and the alloc code handles it by returning 0. If you are going to allocate 0 bytes, you need to be able to free it as well. I fixed this because it was causing a crash in the xhal drive letter assignment code. I suppose you could choose some other invalid pointer value to return for 0 byte allocations and frees if you wanted to. I'm not sure what NT does in this case, but user mode malloc/free new/delete in C/C++ is required to accept this. At 01:21 AM 10/14/2001 -0600, you wrote: >Is it not a bug when kernel mode code trys to free a NULL pointer? Does this >call work under NT? > >Brian > >-----Original Message----- >From: Phillip Susi [mailto:ph...@mo...] >Sent: Saturday, September 29, 2001 12:41 PM >To: ros...@re... >Subject: [ros-cvs-commit] CVS Update: reactos > > >CVSROOT: /CVS/ReactOS >Module name: reactos >Repository: reactos/ntoskrnl/mm/ >Changes by: phreak@mok. 01/09/29 12:40:49 > >Modified files: > reactos/ntoskrnl/mm/: npool.c > >Log message: > Do not bugcheck on ExFreePool( 0 ) ==================================================== = To remove yourself from this mailing list, go to = = http://www.reactos.com/home/mailing.html = ==================================================== |