// JP opened flex table

Click to See Complete Forum and Search --> : Need to allocate specific address


Chris_F
August 14th, 2008, 10:31 AM
I need to write a kernel mode driver (this is not a device driver, really a pseudo driver I guess) for WIndows XP that will allocate a specific portion of memory in ram. Once allocated it only needs to keep it allocated and do nothing further.

I have this laptop that has a small section of defective memory in the first DIMM, which is soldered directly to the motherboard. Its a 1GB module with defects located at about 726MB. Replacment would be the cost of a new laptop (its not mine, I'm doing this for someone else with the intent of releasing it for people with similar problems)

My hope is that a kernel mode driver would be able to allocate that region of ram, making it unavailable for use by other user mode apps or other drivers. It would simply allocate it and then do nothing with it.

I really dont know how to go about reserving a spacific location, or how one would go about finding out what virtual address corresponded to a physical address of ram.

I've writen a few simple kernel modules in linux, but I've never writen a Windows NT driver before.

Chris_F
August 14th, 2008, 02:24 PM
OK, it looks like nothing really gets replied to around here. Anyone here atually know anything about writing drivers? Or possibly know of another place to ask?

zerver
August 27th, 2008, 11:53 AM
Hi!

AFAIK, you cannot choose what address to allocate.

When your driver loads, it is already too late. The OS may already have tried to allocate the defective segment, and crashed.

The closest you could get is to repeatedly allocate whole memory pages until you (hopefully) acquire the page in question and then free the other pages.

//JP added flex table