Memory allocation

Hi All,

What ur suggestion on following…

Writing a NDIS miniport driver… Want to allocate shared memory
for receive buffers( total= 4096, size= 1536 bytes each ).

Should I allocate it at once i.e. size of 4096*1536 bytes OR
should I allocate individually 1536, 4096 times.

What generally you guys do in such cases?

Thanks in adavance
Kishore
Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com
Buy Music, Video, CD-ROM, Audio-Books and Music Accessories from http://www.planetm.co.in

any way …
but go for contiguous allocation. you can trverse systematically.

At once.
Common buffers (called “shared memory” by NDIS) are page-sized, so, allocating 4096 common buffers is a huge waste of memory for unused tails.

Max

----- Original Message -----
From: kxverma
To: NT Developers Interest List
Sent: Tuesday, April 23, 2002 10:56 AM
Subject: [ntdev] Memory allocation

Hi All,

What ur suggestion on following…

Writing a NDIS miniport driver… Want to allocate shared memory
for receive buffers( total= 4096, size= 1536 bytes each ).

Should I allocate it at once i.e. size of 4096*1536 bytes OR
should I allocate individually 1536, 4096 times.

What generally you guys do in such cases?

Thanks in adavance
Kishore


Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com
Buy Music, Video, CD-ROM, Audio-Books and Music Accessories from http://www.planetm.co.in — You are currently subscribed to ntdev as: xxxxx@storagecraft.com To unsubscribe send a blank email to %%email.unsub%%

Where are you allocating it? Application? Anyway you want. Kernel?

Now that takes some discussion and an idea of what you want to do.

Gary G. Little
xxxxx@broadstor.com
xxxxx@inland.net
"kxverma" wrote in message news:xxxxx@ntdev...
Hi All,

What ur suggestion on following..

Writing a NDIS miniport driver... Want to allocate shared memory
for receive buffers( total= 4096, size= 1536 bytes each ).

Should I allocate it at once i.e. size of 4096*1536 bytes OR
should I allocate individually 1536, 4096 times.

What generally you guys do in such cases?

Thanks in adavance
Kishore

------------------------------------------------------------------------------
Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com
Buy Music, Video, CD-ROM, Audio-Books and Music Accessories from http://www.planetm.co.in