| View previous topic :: View next topic |
| Author |
Message |
AlejandroP
Joined: 11 Apr 2025 Posts: 3
|
Posted: Mon Nov 17, 2025 5:40 pm Post subject: Are malloc and calloc thread-safe in SCC? |
|
|
Hi All,
I am wondering if SCC (Silverfrost C Compiler) makes malloc and calloc thread-safe. Do I need to add my own locking around memory allocation when using multiple threads?
Thanks!
Alejandro |
|
| Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8307 Location: Salford, UK
|
Posted: Tue Nov 18, 2025 9:31 am Post subject: |
|
|
| Silverfrost malloc calls GlobalAlloc which is thread-safe. There is no need for locking either internally (within malloc) or externally when calling it. |
|
| Back to top |
|
 |
AlejandroP
Joined: 11 Apr 2025 Posts: 3
|
Posted: Tue Nov 18, 2025 3:20 pm Post subject: |
|
|
| Thank you for the clarification! |
|
| Back to top |
|
 |
|