|
|
|
|
|
by Sasasu
1317 days ago
|
|
PG has a special memory manage rule, named MemoryContext.
All memory allocated in a context will disappear when it leaves that context. this means that you can safely not free memory, or your memory will be freed in unexpected places. this is a big conflict with the way rust manages memory. write extension in rust won't improve it much. And in PG, there is a special method to create a process, creating threads is not possible because the logging system makes heavy use of setjmp(). |
|
Naive question from a non-c user, setjmp/longjmp just manipulate the stack and since each thread has its own execution stack, that should be completely safe ISTM - so why is it unsafe/impossible? I'm missing something.