Why mmap is faster than system calls
原文链接 作者 Alexandra Sasha Fedorova
原文链接 作者 Alexandra Sasha Fedorova
mmap调用进程的虚拟进程空间中一段新的内存映射。
cenos7X86_64
环境: cenos7(X86_64) + openssh ssh端口配置 修改端口 例如8888 文件 /etc/ssh/sshd_config 1 2 #Port 22 Port 8888 重启服务 1 2 systemctl restart sshd systemctl status sshd 防火墙配置: 我这里配置比较简单仅zone配置了一个public 1 firewall-cmd --permanent --zone=public --add-port=8888/tcp 重启服务 1 2 systemctl restart firewalld systemctl status firewalld
题目: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. Note: A leaf is a node with no children. Example: Given the below binary tree and sum = 22, 1 2 3 4 5 6 7 5 / \ 4 8 / / \ 11 13 4 / \ \ 7 2 1 return true, as there exist a root-to-leaf path 5->4->11->2 which sum is 22. ...
题目: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmetric: 1 2 3 4 5 1 / \ 2 2 / \ / \ 3 4 4 3 But the following [1,2,2,null,3,null,3] is not: 1 2 3 4 5 1 / \ 2 2 \ \ 3 3 Follow up: Solve it both recursively and iteratively. ...
Linux初始化通过bootmem/memblock引导内存分配进行内存管理,支持buddy system完成相关初始化后,将物理内存分配的功能转交给buddy system,buddy system是以page为单位分配方式。 对于内核要经常创建的对象, 如task_struct,fs_struct, mm_struct
前不久, 评估CEO 库克在其全球开发者大宣布,Mac笔记本以及个人电脑将会改用苹果自家的ARM架构处理器。这将是自2006年从PowerPC处理器改用英特尔x86处理器后,又一次CPU架构的调整。下面这篇文章是Medium推送的,不过文章贬低X86中提到的漏洞, 我查了资料其实部分ARM也是存在的。 不过确实是代表了一类观点。 苹果
上周在学习单点登录安装CAS Overlay Template要使用指定版本,当时机器上安装了多个版本的jdk使用alternatives命令进行了切换
题目: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. Note: A leaf is a node with no children. Example: Given binary tree [3,9,20,null,null,15,7], 1 2 3 4 5 3 / \ 9 20 / \ 15 7 return its depth = 3. 解题: 深度优先搜索方式,分别找到左右子树最大的深度+1即可;广度优先搜索,逐层遍历找到最大层数返回。 ...