Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8115461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:29:22+00:00 2026-06-06T03:29:22+00:00

So upon mapping a memory space with MmMapIoSpace , I noticed that past a

  • 0

So upon mapping a memory space with MmMapIoSpace, I noticed that past a certain point, the data was just being discarded when written to. No errors, breakpoints, or even bugchecks were thrown. Everything worked as normal, just without any adverse effects.

I decided to do a write/read test (the driver would write 1’s to every byte for the length of the intended size) and the reader (userland) mode would read and report where the 1’s ended.

The number it came up with was 3208, which is a seemingly nice, round number (/8=401, /256=12, etc.)

What’s up with this? How come I can’t map the full buffer space?

EDIT And in 64-bit it drops to 2492.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T03:29:23+00:00Added an answer on June 6, 2026 at 3:29 am

    I’m no expert, but I don’t see how MmMapIoSpace can be relied upon to do what you’re asking it to, because there’s no guarantee that the user-space buffer is contiguous in physical memory.

    Instead, I think you should be using IoAllocateMdl and MmProbeAndLockPages to lock down the user buffer and then MmGetSystemAddressForMdlSafe to map it into the system address space. This process is described here.

    As previous stated, I think that the point at which the mapping is failing (3208/2492 bytes into the buffer) is probably just the end of the page, but that’s easy enough for you to verify: get the user-space application to report the (virtual) address of the first byte that didn’t get written rather than the offset, and check whether it is a multiple of 4096 or not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Upon reviewing a bunch of MVC style web applications, I'm noticing that it's common
Upon submitting this form on my site. It send me to a page that
Upon loading into a C++ program a Prolog program that contains the command 'send'
I'm working with an application and data structure built upon ASP/ADO.NET and I'm converting
My app has 10 features that are enabled/disabled depending upon which of the 3
In the linux kernel, I wrote code that resembles copy_page_range (mm/memory.c) so copy memory
I'm studying up on OS memory management, and I wish to verify that I
I just wanted some input on a project that I'm working on. Basically, I'm
Upon clicking on a link, I am bringing in some images from a JSON
Upon starting my webapp within Tomcat 6.0.18, I bootstrap Spring with only what is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.