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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. large malloc failures

large malloc failures

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
2 Posts 2 Posters 1 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.
  • S Offline
    S Offline
    sysop HAL9K com
    wrote on last edited by
    #1

    We seem to be hitting a fragmentation issue where we go to malloc 380MB on a machine with 1000MB and 3000MB swap and then we get a NULL pointer return from malloc(). This is happening intermittently since we went to VC7. Any ideas on how to work around this? The process shows in PERFMON that it only owns 600MB at the time the 380MB allocation fails and 720 out of 1000MB are in use (72% systemwide). Thanks for any clues :confused:

    J 1 Reply Last reply
    0
    • S sysop HAL9K com

      We seem to be hitting a fragmentation issue where we go to malloc 380MB on a machine with 1000MB and 3000MB swap and then we get a NULL pointer return from malloc(). This is happening intermittently since we went to VC7. Any ideas on how to work around this? The process shows in PERFMON that it only owns 600MB at the time the 380MB allocation fails and 720 out of 1000MB are in use (72% systemwide). Thanks for any clues :confused:

      J Offline
      J Offline
      John R Shaw
      wrote on last edited by
      #2

      :confused:Why not use GlobalAlloc() in a test run last week I found a could allocate a buffer of 1.3 gig on a machine with 512K of ram, running Windows XP professional. Trust in the code Luke. Yea right!

      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