It makes me sad that both of MmAllocateContiguousMemorySpecifyCache() and MmAllocateContiguousMemory() return NULL and MmAllocateNonCachedMemory() succeeds for several times. But sometime MmAllocateNonCachedMemory() crashes, too.
p.s. The same code runs successfully on Windows 8.1/7 x64.
After debugging in WinDbg, I noticed where the problem happens.
Since I need to run the code separately on each processor core, I use KeIpiGenericCall() to run a worker on each core.
KeIpiGenericCall(IpiWorker, NULL);
Before IpiWorker() runs, I can allocate any size of memory I want. However since IpiWorker() runs, whatever size of memory I want to allocate easily fails and even causes a system crash.
You did notice the IRQL that the IpiWorker is called at I hope? It is
IPI_LEVEL which is far above the level that you can safely allocate memory.
Running Code Analysis should have caught this.
If you want to do something like this, you are going to need to create your
own thread pool, one for each processor, or loop through changing processor
affinity to do the work in a thread.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Thursday, December 31, 2015 10:57 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] MmAllocateContiguousMemorySpecifyCache() failed on
Windows 10
After debugging in WinDbg, I noticed where the problem happens.
Since I need to run the code separately on each processor core, I use
KeIpiGenericCall() to run a worker on each core.
KeIpiGenericCall(IpiWorker, NULL);
Before IpiWorker() runs, I can allocate any size of memory I want. However
since IpiWorker() runs, whatever size of memory I want to allocate easily
fails and even causes a system crash.
Is that just an experiment, or is this really your requirement? If all
you need is one page of memory, just use ExAllocatePool. A single page
will ALWAYS be contiguous, by definition. Contiguous is only an issue
if you need multiple pages.
And where did the 2-megabyte alignment figure come from?
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Do you seriously have variables named like interfere constants?
I’m guessing your phone helpfully corrected “integer constants”. The
variables are L1 L2 and L3, lower case. Not 11, 12, 13. Still a
terrible idea, for the very reason you’ve demonstrated here.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Ah thanks. And yes lower case L is hard on the eyes. And happy new year!
Mark Roddy
On Thu, Dec 31, 2015 at 1:39 PM, Tim Roberts wrote:
> xxxxx@osr.com wrote: > > Do you seriously have variables named like interfere constants? > > I’m guessing your phone helpfully corrected “integer constants”. The > variables are L1 L2 and L3, lower case. Not 11, 12, 13. Still a > terrible idea, for the very reason you’ve demonstrated here. > > – > Tim Roberts, xxxxx@probo.com > Providenza & Boekelheide, Inc. > > > — > NTDEV is sponsored by OSR > > Visit the list online at: < > http://www.osronline.com/showlists.cfm?list=ntdev> > > MONTHLY seminars on crash dump analysis, WDF, Windows internals and > software drivers! > Details at http: > > To unsubscribe, visit the List Server section of OSR Online at < > http://www.osronline.com/page.cfm?name=ListServer> ></http:>
It is high time to have Gadget(s) that would market as - No random ads, and no auto correct… Or the marketing line should be “ Sorry for not including random ads and auto correct feature!. But give it a try, you might like it”
Visit the list online at: http: > > MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! > Details at http: > > To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>
It is high time to have Gadget(s) that would market as - No random ads, and no auto correct… Or the marketing line should be “ Sorry for not including random ads and auto correct feature!. But give it a try, you might like itâ€
Or, people who don’t like auto-correct could simply click a few buttons
and make it go away
(For iOS that’s Settings -> General -> Keyboard -> Auto-Correction)
In the past the paradigm was Garbage In is Garbage out. Now Good things in, Garbage out !. The default settings should be to not Auto Correct, and perhaps a friendly notification to enable it, and disable it right from edit control if it does not do the job. I’ve hard so many complains ( including mine). Particularly in SMS ( with lots of abbreviations etc.) what if some one has a spell mistake, does it matters?. But if I type without paying attention, the Auto Correct can be quite rubbish …
-Pro
On Jan 1, 2016, at 4:58 PM, Bruce Cran wrote: > > On 1/1/16 3:52 PM, Prokash Sinha wrote: >> It is high time to have Gadget(s) that would market as - No random ads, and no auto correct… Or the marketing line should be “ Sorry for not including random ads and auto correct feature!. But give it a try, you might like it” > > Or, people who don’t like auto-correct could simply click a few buttons and make it go away > > (For iOS that’s Settings -> General -> Keyboard -> Auto-Correction) > > – > Bruce > > > > > — > NTDEV is sponsored by OSR > > Visit the list online at: http: > > MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! > Details at http: > > To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>
OT but at least autocorrect could freaking LEARN from manual de-corrections.
Mark Roddy
On Fri, Jan 1, 2016 at 8:58 PM, Prokash Sinha wrote:
> Yeah Bruce! > > In the past the paradigm was Garbage In is Garbage out. Now Good things > in, Garbage out !. The default settings should be to not Auto Correct, and > perhaps a friendly notification to enable it, and disable it right from > edit control if it does not do the job. I’ve hard so many complains ( > including mine). Particularly in SMS ( with lots of abbreviations etc.) > what if some one has a spell mistake, does it matters?. But if I type > without paying attention, the Auto Correct can be quite rubbish … > -Pro > > > On Jan 1, 2016, at 4:58 PM, Bruce Cran wrote: > > > > On 1/1/16 3:52 PM, Prokash Sinha wrote: > >> It is high time to have Gadget(s) that would market as - No random ads, > and no auto correct… Or the marketing line should be “ Sorry for not > including random ads and auto correct feature!. But give it a try, you > might like it” > > > > Or, people who don’t like auto-correct could simply click a few buttons > and make it go away > > > > (For iOS that’s Settings -> General -> Keyboard -> Auto-Correction) > > > > – > > Bruce > > > > > > > > > > — > > NTDEV is sponsored by OSR > > > > Visit the list online at: < > http://www.osronline.com/showlists.cfm?list=ntdev> > > > > MONTHLY seminars on crash dump analysis, WDF, Windows internals and > software drivers! > > Details at http: > > > > To unsubscribe, visit the List Server section of OSR Online at < > http://www.osronline.com/page.cfm?name=ListServer> > > > — > NTDEV is sponsored by OSR > > Visit the list online at: < > http://www.osronline.com/showlists.cfm?list=ntdev> > > MONTHLY seminars on crash dump analysis, WDF, Windows internals and > software drivers! > Details at http: > > To unsubscribe, visit the List Server section of OSR Online at < > http://www.osronline.com/page.cfm?name=ListServer> ></http:></http:>
On Jan 2, 2016, at 09:12, Mark Roddy wrote: > > OT but at least autocorrect could freaking LEARN from manual de-corrections. > > Mark Roddy > >> On Fri, Jan 1, 2016 at 8:58 PM, Prokash Sinha wrote: >> Yeah Bruce! >> >> In the past the paradigm was Garbage In is Garbage out. Now Good things in, Garbage out !. The default settings should be to not Auto Correct, and perhaps a friendly notification to enable it, and disable it right from edit control if it does not do the job. I’ve hard so many complains ( including mine). Particularly in SMS ( with lots of abbreviations etc.) what if some one has a spell mistake, does it matters?. But if I type without paying attention, the Auto Correct can be quite rubbish … >> -Pro >> >> > On Jan 1, 2016, at 4:58 PM, Bruce Cran wrote: >> > >> > On 1/1/16 3:52 PM, Prokash Sinha wrote: >> >> It is high time to have Gadget(s) that would market as - No random ads, and no auto correct… Or the marketing line should be “ Sorry for not including random ads and auto correct feature!. But give it a try, you might like it” >> > >> > Or, people who don’t like auto-correct could simply click a few buttons and make it go away >> > >> > (For iOS that’s Settings -> General -> Keyboard -> Auto-Correction) >> > >> > – >> > Bruce >> > >> > >> > >> > >> > — >> > NTDEV is sponsored by OSR >> > >> > Visit the list online at: http: >> > >> > MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! >> > Details at http: >> > >> > To unsubscribe, visit the List Server section of OSR Online at http: >> >> >> — >> NTDEV is sponsored by OSR >> >> Visit the list online at: http: >> >> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! >> Details at http: >> >> To unsubscribe, visit the List Server section of OSR Online at http: > > — NTDEV is sponsored by OSR Visit the list online at: MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at To unsubscribe, visit the List Server section of OSR Online at</http:></http:></http:></http:></http:></http:>