Tech Support > Microsoft Windows > Drivers > ExallocatePool and ExFreePool
ExallocatePool and ExFreePool
Posted by SL Chang on September 15th, 2005


If I use 1 byte pointer to allocate more than 1 byte space,
could it have problem when free the space ?
I mean, does system know how many bytes should be free ?

For example:
////////////////////////////////////////////////////////////////////////////
////////////////////////
PUCHAR buffer;

buffer = ExAllocatePool(NonPagedPool, sizeof(struct DATA));
// do something
ExFreePool(buffer);
////////////////////////////////////////////////////////////////////////////
////////////////////////

Or, pointer must the same structure as allocate size ?


Posted by Mark Roddy on September 15th, 2005


SL Chang wrote:

--

=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com


Similar Posts