摘要: 看了这篇文章 Linux中的进程栈和线程栈 说主线程生成的子线程的 stack 区是用 mmap 系统调用映射到进程的堆区。于是实践验证一下,代码如下。 void* threadFunction(void* args) { int a = 10; // 线程的局部变量 cout <<"&a : " 阅读全文
posted @ 2024-05-21 21:13 hellozhangjz 阅读(7) 评论(0) 推荐(0) 编辑