Tactics of allocate memory

Hi, all

In my NT miniport ndis driver, I should allocate some tempory buffer for SAR
operation. The first step I should do is to allcate memory, then allocate buffer.

Now I have a question:
Whether should I allocate the memory permanently for my driver at the initialize
time of the driver which obviously occupy the system’s memory resources, or should I
just allocate the memory in the SAR routine and free the buffer at the end of the
routine. But the second strategy surely takes the system cpu time resources(with always
allocating memory and freeing memory).

So, what tactics do you think should be taken in my driver?

(The memory I allocate could be less than 10k bytes).

Thank you!

Xiaohua Cai
Institute of Modern Communications , SJTU
Shanghai


Free Email/SMTP/POP, http://www.bn3.com, Hosting xxxxx@yoursite.com