码迷,mamicode.com
首页 >  
搜索关键字:swap    ( 4231个结果
linux系统下查看CPU、内存负载情况
$ vmstat procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------ r b swpd free buff cache si so bi bo in cs us sy id wa st 1 4 329796 26040 4528 3...
分类:系统相关   时间:2014-10-13 18:24:49    阅读次数:248
字符串和数字的全排列问题、前i位被i整除问题
// 全排列问题.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include using namespace std; template void swap(T *str1,T *str2) { T temp; temp=*str1; *str1=*str2; *str2=temp; } void permStr(char *str,...
分类:其他好文   时间:2014-10-09 16:32:48    阅读次数:187
LINUX kvm 性能瓶颈分析
IO负载应用场景wmsmysqldb从库,只做同步的功能每天订单量平均在8000单虚拟机配置cpu:1核超线程(宿主机四核超线程)内存:2G硬盘:300G(LVM独立分出的一块SATA硬盘)虚拟机状况内存:可用为11.23%swap:可用为2.74%cpuload:平均0.34最高:0.85cpujumps:contextswitch:128i..
分类:系统相关   时间:2014-10-09 00:39:57    阅读次数:349
LeetCode-Swap Nodes in Pairs
题目:Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your al...
分类:其他好文   时间:2014-10-09 00:31:07    阅读次数:234
lcok-free简易实现
lock-free是一种基于原子变量类来构建的非阻塞同步算法。比较并交换(compare-and-swap)我们经常会先检查某项东西,然后对其进行修改,如if(X...) {X=...}。这种行为在多线程下并不是线程安全的。那我们该如何做呢?一种方法是对操作进行加锁,如synchornized(ob...
分类:其他好文   时间:2014-10-07 18:37:35    阅读次数:151
HDU 5042 GCD pair 预处理+二分 分段
点击打开链接 #include #include #include #include #include #include using namespace std; typedef long long ll; ll gcd(ll x, ll y){ if(x>y)swap(x,y); while(x){ y%=x; swap(...
分类:其他好文   时间:2014-10-06 17:49:40    阅读次数:240
13--函数模板
一.C++中的泛型编程    --- 函数模板         --- 提供一种特殊函数可用不同类型进行调用         --- 类型可以被参数化 template void Swap(T& a,T& b) { T t=a; a = b; b = t; }     说明: -template 关键字用于声明开始泛型编程            -typename 关键字用于声...
分类:其他好文   时间:2014-10-06 13:20:22    阅读次数:200
Swap Nodes in Pairs
[leetcode]Given a linked list, swap every two adjacent nodes and return its head....
分类:其他好文   时间:2014-10-02 10:53:52    阅读次数:162
Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your algor...
分类:其他好文   时间:2014-10-01 13:46:11    阅读次数:190
内核request_mem_region 和 ioremap的理解
request_mem_region仅仅是linux对IO内存的管理,意思指这块内存我已经占用了,别人就不要动了,也不能被swap出去。使用这些寄存器时,可以不调用request_mem_region,但这样的话就不能阻止别人对他的访问了。http://blog.csdn.net/skyflying...
分类:其他好文   时间:2014-10-01 10:16:01    阅读次数:195
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!