Hi,
I have to allocate two shared buffers one 4K aligned and other 1M aligned
(start address should have LSB 5 digits 0). For 4K aligned I allocate
memory = SIZE+4K and align it later. But in case of 1M aligned, does it
mean that actually I will have to allocate extra 1M of memory and then
align. If yes, then in fact I will be wasting 1M of memory, which is a lot
to waste.
Is there any other approach in this case.
thanks in advance.
Raj
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
Hi,
I have to allocate two shared buffers one 4K aligned and other 1M aligned
(start address should have LSB 5 digits 0). For 4K aligned I allocate memory
= SIZE+4K and align it later. But in case of 1M aligned, does it mean that
actually I will have to allocate extra 1M of memory and then align. If yes,
then in fact I will be wasting 1M of memory, which is a lot to waste.
Is there any other approach in this case.
Secondly, how about aligning the physical address, as same logic is not
aligning the physical address.
LOGIC:
ulOffset = Align_Size - (LogicalAddress % Align_Size)
PhysicalAddress->LowPart = PhysicalAddress->LowPart + ulOffset;
thanks in advance.
Raj
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You’ll be lucky to get this memory. The real thing to do is fix the hardware
so it does not have this unrealistic restriction. What PCI chipset are you
using?
Paul Lever
----- Original Message -----
From: “rajinder sharma”
To: “NT Developers Interest List”
Sent: Monday, March 05, 2001 3:00 PM
Subject: [ntdev] allocating 1Meg aligned shared memory for DMA over PCI
> Hi,
> I have to allocate two shared buffers one 4K aligned and other 1M aligned
> (start address should have LSB 5 digits 0). For 4K aligned I allocate
memory
> = SIZE+4K and align it later. But in case of 1M aligned, does it mean that
> actually I will have to allocate extra 1M of memory and then align. If
yes,
> then in fact I will be wasting 1M of memory, which is a lot to waste.
>
> Is there any other approach in this case.
>
> Secondly, how about aligning the physical address, as same logic is not
> aligning the physical address.
>
> LOGIC:
> ulOffset = Align_Size - (LogicalAddress % Align_Size)
> PhysicalAddress->LowPart = PhysicalAddress->LowPart + ulOffset;
>
> thanks in advance.
> Raj
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@home.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
—
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com