MmAllocateContiguousMemory

hi,

i am trying to allocate physically contiguous memory from
non-paged pool using MmAllocateContiguousMemory on NT4. when i
deallocate the same using MmFreeContiguousMemory, this is what
i get :

POOL:unable to find big page slot ffb55000
POOL: Unable to find tracker 20474942, table corrupted

while the system doesn’t crash or do funny things, i’m not
able to find whats going wrong and where.

attached below is the src.

help.

—javed

====================================================================

#define MAXIMUM_DMA_ADDRESS 0xffffffffffffffff

/*------------------------------------------------------------------------------------------*/

//** Global variables

NTSTATUS DriverEntry(
IN PDRIVER_OBJECT pDriverObject,
IN PUNICODE_STRING puniRegistryPath
)
{
NTSTATUS ntStatus=STATUS_SUCCESS; //Status variable

PUCHAR pBuffer1=NULL;
PUCHAR pBuffer2=NULL;

LARGE_INTEGER maxDmaAddress;

maxDmaAddress.QuadPart = MAXIMUM_DMA_ADDRESS;

pBuffer1 =
(PUCHAR) MmAllocateContiguousMemory
(
1024 * 6,
maxDmaAddress
);
if(pBuffer1 == NULL){
DbgPrint(“\ntest: Couldn’t allocate buffer1\n”);
ntStatus = STATUS_INSUFFICIENT_RESOURCES;
goto Done;
}

pBuffer2 =
(PUCHAR) MmAllocateContiguousMemory
(
10240,
maxDmaAddress
);
if(pBuffer2 == NULL){
DbgPrint(“\ntest: Couldn’t allocate buffer2 \n”);
ntStatus = STATUS_INSUFFICIENT_RESOURCES;
}

if(pBuffer1){
MmFreeContiguousMemory(pBuffer1);
}

if(pBuffer2){
MmFreeContiguousMemory(pBuffer2);
}

Done:
ntStatus = STATUS_INSUFFICIENT_RESOURCES;

return ntStatus;
}

You can safely ignore these messages on NT4.0. This is happening because of
a bug in the pool tracking code. This is fixed on Win2K. Basically this
happens when the system couldn’t expand the pool tag table (it’s dynamic in
Win2K).

-Eliyas

-----Original Message-----
From: xxxxx@cdac.ernet.in [mailto:xxxxx@cdac.ernet.in]
Sent: Monday, July 10, 2000 5:00 PM
To: NT Developers Interest List
Subject: [ntdev] MmAllocateContiguousMemory

hi,

i am trying to allocate physically contiguous memory from
non-paged pool using MmAllocateContiguousMemory on NT4. when i
deallocate the same using MmFreeContiguousMemory, this is what
i get :

POOL:unable to find big page slot ffb55000
POOL: Unable to find tracker 20474942, table corrupted

while the system doesn’t crash or do funny things, i’m not
able to find whats going wrong and where.

attached below is the src.

help.

—javed

====================================================================

#define MAXIMUM_DMA_ADDRESS 0xffffffffffffffff

/*--------------------------------------------------------------------------
----------------*/

//** Global variables

NTSTATUS DriverEntry(
IN PDRIVER_OBJECT pDriverObject,
IN PUNICODE_STRING puniRegistryPath
)
{
NTSTATUS ntStatus=STATUS_SUCCESS; //Status variable

PUCHAR pBuffer1=NULL;
PUCHAR pBuffer2=NULL;

LARGE_INTEGER maxDmaAddress;

maxDmaAddress.QuadPart = MAXIMUM_DMA_ADDRESS;

pBuffer1 =
(PUCHAR) MmAllocateContiguousMemory
(
1024 * 6,
maxDmaAddress
);
if(pBuffer1 == NULL){
DbgPrint(“\ntest: Couldn’t allocate buffer1\n”);
ntStatus = STATUS_INSUFFICIENT_RESOURCES;
goto Done;
}

pBuffer2 =
(PUCHAR) MmAllocateContiguousMemory
(
10240,
maxDmaAddress
);
if(pBuffer2 == NULL){
DbgPrint(“\ntest: Couldn’t allocate buffer2 \n”);
ntStatus = STATUS_INSUFFICIENT_RESOURCES;
}

if(pBuffer1){
MmFreeContiguousMemory(pBuffer1);
}

if(pBuffer2){
MmFreeContiguousMemory(pBuffer2);
}

Done:
ntStatus = STATUS_INSUFFICIENT_RESOURCES;

return ntStatus;
}


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)