forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Are malloc and calloc thread-safe in SCC?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
AlejandroP



Joined: 11 Apr 2025
Posts: 3

PostPosted: Mon Nov 17, 2025 5:40 pm    Post subject: Are malloc and calloc thread-safe in SCC? Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8307
Location: Salford, UK

PostPosted: Tue Nov 18, 2025 9:31 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
AlejandroP



Joined: 11 Apr 2025
Posts: 3

PostPosted: Tue Nov 18, 2025 3:20 pm    Post subject: Reply with quote

Thank you for the clarification!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group