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. Memory Allocation over 64k

Memory Allocation over 64k

Scheduled Pinned Locked Moved C / C++ / MFC
questiondelphiperformance
4 Posts 4 Posters 5 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.
  • C Offline
    C Offline
    Cambalindo
    wrote on last edited by
    #1

    Hi, I'm trying to allocate memory in DOS using Borland Turbo C. I need about 1MB but the system only gives me 64Kb. does anybody know how can I change the memory model to get more memory? thanks in advance. Daniel Cespedes "There are 10 types of people, those who understand binary and those who do not" "Santa Cruz de la Sierra Paraiso Terrenal!" daniel.cespedes@ieee.org

    Z D Q 3 Replies Last reply
    0
    • C Cambalindo

      Hi, I'm trying to allocate memory in DOS using Borland Turbo C. I need about 1MB but the system only gives me 64Kb. does anybody know how can I change the memory model to get more memory? thanks in advance. Daniel Cespedes "There are 10 types of people, those who understand binary and those who do not" "Santa Cruz de la Sierra Paraiso Terrenal!" daniel.cespedes@ieee.org

      Z Offline
      Z Offline
      Zdeslav Vojkovic
      wrote on last edited by
      #2

      if i remember correctly, you have to choose different memory model. "small" supports only 64kb for stack and 64kb for data. try choosing 'compact' (64kb code, 64 kb static data and stack, 1 Mb heap) or 'large' (like 'compact', but 1Mb for code). you can change this from 'options' menu: Options -> compiler -> model. you can read more about this in Turbo C online help.

      1 Reply Last reply
      0
      • C Cambalindo

        Hi, I'm trying to allocate memory in DOS using Borland Turbo C. I need about 1MB but the system only gives me 64Kb. does anybody know how can I change the memory model to get more memory? thanks in advance. Daniel Cespedes "There are 10 types of people, those who understand binary and those who do not" "Santa Cruz de la Sierra Paraiso Terrenal!" daniel.cespedes@ieee.org

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        Turbo C is a 16-bit compiler. I do not know of an answer but try using the large or huge memory model.


        "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

        1 Reply Last reply
        0
        • C Cambalindo

          Hi, I'm trying to allocate memory in DOS using Borland Turbo C. I need about 1MB but the system only gives me 64Kb. does anybody know how can I change the memory model to get more memory? thanks in advance. Daniel Cespedes "There are 10 types of people, those who understand binary and those who do not" "Santa Cruz de la Sierra Paraiso Terrenal!" daniel.cespedes@ieee.org

          Q Offline
          Q Offline
          QuiJohn
          wrote on last edited by
          #4

          Let's do the time warp again! (danananananana) Anyway. You need to use XMS or EMS or some other DOS memory extender if you want to go beyond 640K. Thankfully (for me, not you) I never did any heavy duty DOS programming. Even staying within the lower 640K was a nightmare I don't ever want to repeat. So unless there are fancier tools available now, do some googling on expanded or extended memory. DOS/4GW was one too, I think? Several games used that IIRC.

          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