Linux系统实现虚拟内存有两种方法:交换分区(swap分区)和交换文件 交换文件 查看内存:free -m , -m是显示单位为MB,-g单位GB 创建一个文件:touch /root/swapfile 使用dd命令,来创建大小为2G的文件swapfile: dd if=/dev/zero of= ...
分类:
系统相关 时间:
2019-11-29 00:39:21
阅读次数:
114
目录 一、 主机的IP地址配置与连通性测试 1.1IP地址配置 1.2连通性测试 1.3网络地址规划表 二、 数据链路层抓包分析 2.1 MAC帧格式 2.2 MAC地址分析 三、 网络层抓包分析 3.1 IP报文 3.2 ARP协议 3.3 ICMP协议 四、 传输层抓包分析 4.1 TCP协议3 ...
分类:
其他好文 时间:
2019-11-28 01:21:21
阅读次数:
168
top命令经常用来监控linux的系统状况,比如cpu、内存的使用,程序员基本都知道这个命令。按 q 退出 2、free -m:看内存占用 主要看第一行Mem 总共 15710 M , 使用了 823 M , 剩余空闲 7895 M 。这个shared 223M 也不知道用在哪里。 3、 df -h ...
分类:
其他好文 时间:
2019-11-27 20:47:06
阅读次数:
87
Math 185 Final Project (Due December 8)Problem 1The baseball dataset consists of the statistics of 263 players in Major LeagueBaseball in the season 1 ...
分类:
其他好文 时间:
2019-11-27 19:01:50
阅读次数:
96
原题链接在这里:https://leetcode.com/problems/shortest-path-in-binary-matrix/ 题目: In an N by N square grid, each cell is either empty (0) or blocked (1). A cl ...
分类:
其他好文 时间:
2019-11-27 12:34:06
阅读次数:
82
第一章 网络空间安全概述 ==1.1. 工作和生活中的网络安全== 1.1.1 生活中常见的网络安全问题 1.账号密码被盗 2.信用卡被盗刷 3.除此之外还有网络诈骗和钓鱼网站等形形色色的网络空间安全事件 1.1.2 工作中常见的网络安全问题 1.网络设备面临的威胁 路由器是常用的网络设备,是企业内 ...
分类:
其他好文 时间:
2019-11-27 01:13:34
阅读次数:
87
spring boot模板 spring boot分以下两个模板 1、thyme leaf模板 》 相当于html页面 2、free marker模板 Thymeleaf模板介绍 直接看代码 pom依赖 <dependency> <groupId>org.springframework.boot</ ...
分类:
编程语言 时间:
2019-11-27 00:32:08
阅读次数:
72
Linux下可以使用free命令查看内存使用情况,也可以使用cat /proc/meminfo命令查看更为详细的内存使用信息。 其中,对于MemAvailable这个参数添加的原因,可以参考kernel这个git commit说明,其实已经很清楚了。 https://git.kernel.org/p ...
分类:
系统相关 时间:
2019-11-26 22:54:54
阅读次数:
161
#include<iostream> using namespace std; int** path; int** result; int** square; int dirx[8] = { 0,0,1,1,1,-1,-1,-1 };//8个方向变量 int diry[8] = { 1,-1,-1, ...
分类:
编程语言 时间:
2019-11-26 13:49:06
阅读次数:
74
1.标准strcat 会有溢出风险,sdscat无溢出风险 2.空间预分配,惰性空间释放 空间预分配:sds分配空间时,如果原来是5,free是0, sdscat追加一个10长度的,此时字符串加长到15,free也同时分配15,总长为15 + 15free + 1(/0) 为31字节; 若大于1M后 ...
分类:
其他好文 时间:
2019-11-26 09:32:13
阅读次数:
89