memory max if any

This is a discussion on memory max if any within the C++ Programming forums, part of the General Programming Boards category; for dev c++ 4 is there a memor max. if so wut is it. and do u think it should ...

  1. #1
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608

    memory max if any

    for dev c++ 4 is there a memor max. if so wut is it. and do u think it should be something i should be really careful about? or jsut make sure i dont waste mem all the time
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  2. #2
    Registered User
    Join Date
    Feb 2002
    Posts
    114
    The memory max should be the total of what the computer have in RAM and windows swap... if you wanna test, make a program that loops and allocates more memory every loop, the program will stop when you run out of memory... use the task mamager to see how much you have allocated. i can allocate about 2 gig of memory on my computer...

  3. #3
    Registered User
    Join Date
    Jul 2002
    Posts
    66
    You probably mean the stack size. If you use a computer with an x86 architecture then the limit is 64Kbytes because that's the size of one segment and you can't go past it. On other computers the stack will grow as needed. But there's also virtual memory on any decent architecture, so most of the time you don't have to worry about running out of memory unless you do something dumb like cause a massive memory leak.

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,337
    > If you use a computer with an x86 architecture then the limit is 64Kbytes
    Only if it's running real DOS (the 16 bit variety)

    Win32 and protected mode DOS programs (eg those written with DJGPP) do not have this limit.

    > and do u think it should be something i should be really careful about?
    Careful yes, but not to the point of being paranoid about it.

    There are plenty of dumb things you can do to waste memory though

  5. #5
    Registered User
    Join Date
    Jul 2002
    Posts
    66
    How did they manage to remove the limit in Win32 and protected mode?

  6. #6
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,337
    > How did they manage to remove the limit in Win32 and protected mode?
    By using ESP everywhere instead of SP

    Gets you a 32 bit address space to play in, thus allowing you to have very large stacks

  7. #7
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    thanks crimpy thats what i meant, and thatnks salem. ur helped helped me wiht somethgin else.
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Assignment Operator, Memory and Scope
    By SevenThunders in forum C++ Programming
    Replies: 47
    Last Post: 03-31-2008, 06:22 AM
  2. Ranged numbers
    By Desolation in forum Game Programming
    Replies: 8
    Last Post: 07-25-2006, 10:02 PM
  3. Novice Pointers/Class Question
    By C++Gamer in forum C++ Programming
    Replies: 8
    Last Post: 06-28-2006, 05:36 PM
  4. Memory Leak Help
    By (TNT) in forum Windows Programming
    Replies: 3
    Last Post: 06-19-2006, 11:22 AM
  5. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 09:37 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21