Thread: Calling C function from dynamically loaded library

  1. #16
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by Elysia View Post
    Eh? "Shared" objects are loaded into the process space of the process that loads it in Windows.
    They have separate heaps. What sort of nonsense is that?

    And Windows makes a lot of sense where Linux doesn't (*cough* memory allocation succeeds when there might be no physical memory left *cough*).
    Code:
    echo 0 > /proc/sys/vm/overcommit_memory
    Fixed.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  2. #17
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    They have separate heaps. What sort of nonsense is that?
    Elysia is correct. In Windows the DLL is loaded into the executable's process (they share the same address space). The DLL and executable will only have separate heaps if they statically link to the RTL. If they both dynamically link to the RTL, then they will share the same heap.

    Fixed.
    0 is the default. 2 turns off overcommit (as I posted earlier in this thread already).
    bit∙hub [bit-huhb] n. A source and destination for information.

  3. #18
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by bithub View Post
    By my count, the original question was answered 3 times, so I don't think it matters much.
    If it moves off-topic, I would generally just recommend splitting the thread. That doesn't hurt the discussion as locking the topic or pointing it out does.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. dllimport function not allowed
    By steve1_rm in forum C++ Programming
    Replies: 5
    Last Post: 03-11-2008, 03:33 AM
  3. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  4. A Function Calling a Function
    By dac in forum C++ Programming
    Replies: 8
    Last Post: 12-17-2006, 04:10 PM
  5. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM