Use of exinitializenpagedlookasidelist()

I am in need of creating a table for some operation to be performed by the
driver. For this i will be needing dynamic memory allocation. This can be
done using exinitializenpagedlookasidelist() right? I would like to know if
there are examples on how to use this and also if anyone has suggestions on
the best way to store a table in the kernel mode. Linked lists and malloc
would do the job in the case of user mode. But what do i use here?? Any help
will be great…
Thanks in advance.

I will be storing some data related to each file that is being intercepted
by my filter driver. And access to the list will also be pretty regular. An
updation may occur every time a create, write, close or cleanup operation
takes place. And what does perf critical path mean? Access synchronization i
will take care of.

Actually the problem is with allocating memory. The link list i have created
but the trouble i have is i am using exallocatepoolwithtag().
Sorry if my ques sounds dumb but here goes. It is necessary to use different
tags everytime i am allocating memory for a node in the list right? So
because of that i am not able to write a routine to insert a node as i dont
know how to get a new tag everytime. Any help will be great.

Actually the problem is with allocating memory. The link list i have created
but the trouble i have is i am using exallocatepoolwithtag().
Sorry if my ques sounds dumb but here goes. It is necessary to use different
tags everytime i am allocating memory for a node in the list right? So
because of that i am not able to write a routine to insert a node as i dont
know how to get a new tag everytime. Any help will be great.

I figured out how to do and got the list part done. Thanks anyway.

On 5/30/06 3:15 AM, “Shreyas Srivatsan” wrote:
> And what does perf critical path mean?

Sorry, I was typing on auto-pilot at 2:00 am… “Performance-critical path”.

-sd

On 5/30/06 3:27 AM, “Shreyas Srivatsan” wrote:
> It is necessary to use different
> tags everytime i am allocating memory for a node in the list right? S

Tags are useful as an accounting mechanism for your driver; you typically
want to use the same tag for every allocation of a given type. You might
want to use the same tag for allocation of each list node (and only for list
nodes), for example.

This way you can tell if your list manipulation logic is leaking memory.
There are several tools you can use; I think the DDK docs for
ExAlocatePoolWithTag() mention some of them.

-sd

Pool tags are only for debug memory leak seeking using WinDbg and Poolmon.
They do not influence any behaviour unless you will switch on the bit 0x400
in GlobalFlag - without this bit, neither Poolmon nor WinDbg’s !poolused works.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Shreyas Srivatsan”
To: “Windows File Systems Devs Interest List”
Sent: Tuesday, May 30, 2006 12:27 PM
Subject: [ntfsd] Use of exinitializenpagedlookasidelist()

> Actually the problem is with allocating memory. The link list i have created
> but the trouble i have is i am using exallocatepoolwithtag().
> Sorry if my ques sounds dumb but here goes. It is necessary to use different
> tags everytime i am allocating memory for a node in the list right? So
> because of that i am not able to write a routine to insert a node as i dont
> know how to get a new tag everytime. Any help will be great.
>
> —
> Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Actually, that has not been true for quite a while. First tags are enabled
for all versions of the checked build and for all Server 2003 and later
systems. Second, if you use the PROTECTED_POOL bit in the tag, it forces
checking for ExFreePoolWithTag with a matching tag.


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply

“Maxim S. Shatskih” wrote in message
news:xxxxx@ntfsd…
> Pool tags are only for debug memory leak seeking using WinDbg and
> Poolmon.
> They do not influence any behaviour unless you will switch on the bit
> 0x400
> in GlobalFlag - without this bit, neither Poolmon nor WinDbg’s !poolused
> works.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
> ----- Original Message -----
> From: “Shreyas Srivatsan”
> To: “Windows File Systems Devs Interest List”
> Sent: Tuesday, May 30, 2006 12:27 PM
> Subject: [ntfsd] Use of exinitializenpagedlookasidelist()
>
>
>> Actually the problem is with allocating memory. The link list i have
>> created
>> but the trouble i have is i am using exallocatepoolwithtag().
>> Sorry if my ques sounds dumb but here goes. It is necessary to use
>> different
>> tags everytime i am allocating memory for a node in the list right? So
>> because of that i am not able to write a routine to insert a node as i
>> dont
>> know how to get a new tag everytime. Any help will be great.
>>
>> —
>> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>>
>> You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>