Semaphores and Mutexes

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

Semaphores and Mutexes

Post by Neo »

I really looking for some quick answers here.
What is a semaphore?
What is a Mutex?
Which is used where?
Which is better?

and also another question
In Win32 if a DLL calls malloc() where is the memory allocated from local heap or global heap?

Hope i'm not all over the place. :)
Only Human
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Semaphores and Mutexes

Post by Pype.Clicker »

User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

Re:Semaphores and Mutexes

Post by Neo »

Any answers to the way WIN32 DLL's allocate memory?
Only Human
Dreamsmith

Re:Semaphores and Mutexes

Post by Dreamsmith »

Neo wrote:In Win32 if a DLL calls malloc() where is the memory allocated from local heap or global heap?
Calls to a DLL (including the initial call to DllMain) occur in the context of the process or thread in question, so it comes from the same place that process or thread would get memory from if it called malloc itself.
Post Reply