memory allocation fails

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sabeel mk
    New Member
    • Oct 2010
    • 2

    #1

    memory allocation fails

    Hi

    I am running a program on Windows PC with 8GB RAM,64bit intel processor,windo ws7 64 bit OS.

    i use calloc for memory allocation,and is compiled in Microsoft Express edition version 8

    My program requires around 6-7 GB of memory allocation of of the 8GB RAM,but after memory allocation of around 1.9GB, calloc returns NULL pointer.

    The "Available physical memory is 7.86GB" of the 8GB RAM(displayed in System information)

    Hence my question is,why the program is NOT able to allocate memory,even when another 5GB of physical memory is available in the RAM,after memory allocation of around 1.9GB.

    Can u guys please tell me,whats probably going wrong,and how i can correct it

    thanks in advance for help
  • newb16
    Contributor
    • Jul 2008
    • 687

    #2
    If your program is not compiled to a 64-bit executable ( and it most likely isn't because express edition doesn't support*** native 64 bit target) you are limited to 2 or 3 GB address space.

    edit: *** googled a bit - actually it supports, but from command line only, not from the IDE.

    Comment

    • sabeel mk
      New Member
      • Oct 2010
      • 2

      #3
      Hi

      I googled earlier to get the steps for compiling express edition 2008,in 64bit to obtain a 64 bit executable

      but i am facing following two problems

      1) I tried to compile express edition in 64 bit,but,i am not able to import 32 bit project properties into 64 bit project properties.
      Hence i am not able to compile it into a 64bit executable.

      2) The code i am running is open source,and has dependencies on 32 bit

      any help/guidance in solving above problems would be great

      thanks

      Comment

      • newb16
        Contributor
        • Jul 2008
        • 687

        #4
        Windows has AWE - and it apparently works not only on 32-bit systems with PAE but also for 32 bit apps running under WOW64 on EM64T systems. But you will have to allocate-lock-use-unlock memory like it was on 16-bit windows.

        Comment

        Working...