Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to partially map a shared memory

How to partially map a shared memory

Scheduled Pinned Locked Moved C / C++ / MFC
jsonperformancetutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pandit84
    wrote on last edited by
    #1

    Hi , I have created a shared memory using CreateSharedMemory () and mapping is done using MapViewOfFile () API. Is it possible to map only some part of Shared Memory? Does DWORD dwOffSetHigh and DWORD dwOffsetLow (i.e 3rd and 4th Parameter of MapViewOfFile () Method) need to be modified considering Allocation Granularity. Currently I can see the System granularity as 65535 using GetSystemInfo (). Thanks

    N 1 Reply Last reply
    0
    • P pandit84

      Hi , I have created a shared memory using CreateSharedMemory () and mapping is done using MapViewOfFile () API. Is it possible to map only some part of Shared Memory? Does DWORD dwOffSetHigh and DWORD dwOffsetLow (i.e 3rd and 4th Parameter of MapViewOfFile () Method) need to be modified considering Allocation Granularity. Currently I can see the System granularity as 65535 using GetSystemInfo (). Thanks

      N Offline
      N Offline
      Niklas L
      wrote on last edited by
      #2

      The offset values are a 64-bit value split into two 32-bit ones, and as far as I know, can map any portion of a file. Did you encounter any problems?

      home

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups