malloc and virtual memory.

This is a discussion on malloc and virtual memory. within the C Programming forums, part of the General Programming Boards category; Hi, if i will malloc a lot of space, and actually exceeding the physical memory capacity, will my malloc begin ...

  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    6

    malloc and virtual memory.

    Hi,
    if i will malloc a lot of space, and actually exceeding the physical memory capacity,
    will my malloc begin to allocate into virtual memory eventually?

    thanks.

  2. #2
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    You'd most likely crash the OS long before that happened.

  3. #3
    Registered User
    Join Date
    Sep 2008
    Posts
    200
    Quote Originally Posted by urbanleg View Post
    Hi,
    if i will malloc a lot of space, and actually exceeding the physical memory capacity,
    will my malloc begin to allocate into virtual memory eventually?

    thanks.
    What do you mean? You're always allocating "into virtual memory" because virtual memory is all that an application really sees. What are you really wanting to know?

  4. #4
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by JohnGraham View Post
    What do you mean? You're always allocating "into virtual memory" because virtual memory is all that an application really sees. What are you really wanting to know?
    I took it to mean to begin allocating chunks of swap file... which some windows people refer to as "virtual memory".

  5. #5
    Registered User
    Join Date
    Apr 2010
    Posts
    6
    Quote Originally Posted by JohnGraham View Post
    What do you mean? You're always allocating "into virtual memory" because virtual memory is all that an application really sees. What are you really wanting to know?
    ok, that helps...
    thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What does Malloc do?
    By Albinoswordfish in forum C Programming
    Replies: 4
    Last Post: 03-10-2010, 06:23 AM
  2. Process Resources and System Limits Problem
    By yair in forum C Programming
    Replies: 2
    Last Post: 09-07-2005, 03:24 AM
  3. virtual memory program
    By funkylunch in forum Windows Programming
    Replies: 14
    Last Post: 12-04-2003, 11:15 AM
  4. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 10:37 AM
  5. Is it necessary to write a specific memory manager ?
    By Morglum in forum Game Programming
    Replies: 18
    Last Post: 07-01-2002, 02:41 PM

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