[m-users.] What is "thread-local storage"?

Volker Wysk post at volker-wysk.de
Fri Dec 15 22:20:22 AEDT 2023


Hi!

In mercury_memory.h, there's this:

// MR_GC_NEW(type):
//  Allocates space for an object of the specified type.
//  If conservative GC is enabled, the object will be garbage collected
//  when it is no longer referenced from GC-traced memory.
//  Memory allocated with malloc() (or MR_malloc() or MR_NEW())
//  is not GC-traced. Nor is thread-local storage.

I don't understand the "Nor is thread-local storage." part. What is 
"thread-local storage"? Do I need to care?

TIA
Volker


More information about the users mailing list